mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
22 lines
830 B
Docker
22 lines
830 B
Docker
FROM arm64v8/node
|
|
|
|
WORKDIR /root/lottery
|
|
|
|
COPY . .
|
|
|
|
RUN npm config set registry https://registry.npm.taobao.org && npm i
|
|
|
|
ENV DOWNLOAD_HOST=https://download.fastgit.org \
|
|
RELEASE_TAG=v3.4 \
|
|
NODEV=18.5.0 \
|
|
PKG_CACHE_PATH=/root/.pkg-cache \
|
|
PKG_IGNORE_TAG=true
|
|
|
|
RUN mkdir -p "${PKG_CACHE_PATH}" && \
|
|
curl -L "$DOWNLOAD_HOST/vercel/pkg-fetch/releases/download/$RELEASE_TAG/node-v$NODEV-linux-arm64" -o \
|
|
"${PKG_CACHE_PATH}/fetched-v$NODEV-linux-arm64" && \
|
|
curl -L "$DOWNLOAD_HOST/vercel/pkg-fetch/releases/download/$RELEASE_TAG/node-v$NODEV-linuxstatic-arm64" -o \
|
|
"${PKG_CACHE_PATH}/fetched-v$NODEV-linuxstatic-arm64"
|
|
|
|
CMD ["bash", "-c", "npx pkg -t node$NODEV-linuxstatic-arm64 -o dist/lottery-auto-script-node$NODEV-linuxstatic-arm64 . && \
|
|
npx pkg -t node$NODEV-linux-arm64 -o dist/lottery-auto-script-node$NODEV-linux-arm64 ."] |