mirror of
https://github.com/whyour/qinglong.git
synced 2026-11-07 19:19:53 +08:00
23 lines
893 B
Docker
23 lines
893 B
Docker
ARG LEGACY_IMAGE
|
|
ARG BASE_IMAGE
|
|
FROM ${LEGACY_IMAGE} AS legacy
|
|
FROM ${BASE_IMAGE} AS bridge
|
|
ARG BASE_IMAGE
|
|
ENV QL_BUNDLE_BASE_IMAGE=${BASE_IMAGE}
|
|
ARG TARGETARCH
|
|
ARG TARGETVARIANT
|
|
USER root
|
|
COPY --from=legacy /ql/ /legacy/
|
|
RUN ulimit -c 0; if [ "$TARGETARCH/$TARGETVARIANT" = arm/v6 ]; then \
|
|
export QEMU_CPU=arm1176; \
|
|
apk add --no-cache build-base nodejs-dev && \
|
|
node --jitless /ql/scripts/build-migration-bridge.cjs /legacy /ql /out && \
|
|
for archive in /out/qinglong-*-linux-armv6-musl.tar.gz; do \
|
|
case "$archive" in */qinglong-migration-*) continue ;; esac; \
|
|
node /ql/shell/install-bundle.cjs --root /tmp/ql-bundle-offline-smoke --file "$archive" --install && \
|
|
rm -rf /tmp/ql-bundle-offline-smoke || exit 1; \
|
|
done; \
|
|
else node /ql/scripts/build-migration-bridge.cjs /legacy /ql /out; fi
|
|
FROM scratch
|
|
COPY --from=bridge /out/ /
|