Skip to content

Commit

Permalink
chore: 更新 docker 镜像 Node.js 到 18
Browse files Browse the repository at this point in the history
  • Loading branch information
hacke2 committed Aug 29, 2024
1 parent bd93279 commit 29b9217
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
FROM node:14 as builder
FROM node:18 as builder

# 用户工作空间,用于打包到前端工作空间地址
ENV WORKSPACE_DIR workspace
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
Expand All @@ -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
Expand Down

0 comments on commit 29b9217

Please sign in to comment.