chore: optimize Dockerfile with pnpm for Node.js dependencies

This commit is contained in:
quantstu 2023-11-12 17:15:39 +08:00 committed by GitHub
parent 58bb3ab6f6
commit 2166824ccc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,8 @@ FROM node:16 as builder
WORKDIR /build WORKDIR /build
COPY web/package.json . COPY web/package.json .
RUN npm install RUN npm install -g pnpm
RUN pnpm install
COPY ./web . COPY ./web .
COPY ./VERSION . COPY ./VERSION .
RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build