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 9ad04ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.PACKAGES_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down
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 9ad04ad

Please sign in to comment.