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