From 29b9217f38bbf0ac7b0173d5d781f9e325829b9a Mon Sep 17 00:00:00 2001 From: "xinglong.wangwxl" Date: Thu, 29 Aug 2024 11:06:34 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20docker=20?= =?UTF-8?q?=E9=95=9C=E5=83=8F=20Node.js=20=E5=88=B0=2018?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d0e42a..eb90261 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14 as builder +FROM node:18 as builder # 用户工作空间,用于打包到前端工作空间地址 ENV WORKSPACE_DIR workspace @@ -6,17 +6,18 @@ ENV EXTENSION_DIR extensions COPY . . -ENV ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/ +ENV ELECTRON_MIRROR https://npmmirror.com/mirrors/electron/ RUN mkdir -p ${WORKSPACE_DIR} &&\ mkdir -p ${EXTENSION_DIR} -RUN yarn --ignore-scripts --network-timeout 1000000&& \ +RUN yarn config set -H npmRegistryServer "https://registry.npmmirror.com" && \ + yarn --ignore-scripts --network-timeout 1000000 && \ yarn run build && \ yarn run download:extensions && \ rm -rf ./node_modules -FROM node:14 as app +FROM node:18 as app ENV WORKSPACE_DIR /workspace ENV EXTENSION_DIR /root/.sumi/extensions @@ -30,7 +31,8 @@ WORKDIR /release COPY ./configs/docker/productionDependencies.json package.json -RUN yarn --network-timeout 1000000 +RUN yarn config set -H npmRegistryServer "https://registry.npmmirror.com" && \ + yarn --network-timeout 1000000 COPY --from=builder dist dist COPY --from=builder dist-node dist-node