deemix-docker/Dockerfile.binary

24 lines
1.1 KiB
Docker
Raw Normal View History

2022-02-11 12:25:09 +00:00
FROM node:16-alpine
ARG PACKAGE_REGISTRY_URL
ARG TARGETARCH
2022-02-11 13:12:57 +00:00
ARG JOB_TOKEN
2022-02-11 12:32:51 +00:00
RUN apk add --no-cache curl git && echo $TARGETARCH
2022-02-11 12:25:09 +00:00
COPY deemix-gui deemix-gui
WORKDIR deemix-gui/
2022-02-11 13:35:40 +00:00
# Only install pkg
2022-02-11 14:23:12 +00:00
RUN ls-al && yarn config set network-timeout 1000000 -g && yarn add pkg@latest
#RUN if [ "${TARGETARCH}" = "arm64" ]; then \
# yarn install && yarn set-version && ./node_modules/.bin/pkg -t arm64 --out-dir dist ./server/package.json && yarn reset-version && ls -al dist/; \
# fi;
RUN if [ "${TARGETARCH}" = "amd64" ]; then \
2022-02-11 14:23:12 +00:00
yarn install && yarn set-version && ./node_modules/.bin/pkg -t x64 --out-dir dist ./server/package.json && yarn reset-version && ls -al dist/; \
fi;
2022-02-11 14:23:12 +00:00
#RUN if [ "${TARGETARCH}" = "arm" ]; then \
# yarn install && yarn set-version && ./node_modules/.bin/pkg -t armv7 --out-dir dist ./server/package.json && yarn reset-version && ls -al dist/; \
# fi;
#RUN yarn install && yarn set-version && ./node_modules/.bin/pkg --out-dir dist ./server/package.json && yarn reset-version && ls -al dist/
2022-02-11 13:12:57 +00:00
RUN curl --header "JOB-TOKEN: ${JOB_TOKEN}" --upload-file dist/deemix-server ${PACKAGE_REGISTRY_URL}/deemix-server-linux-$TARGETARCH