From 7f1859b838830630672bcb62fa872a7ac69f79ea Mon Sep 17 00:00:00 2001 From: IlhamTahir Date: Sun, 17 Nov 2024 15:48:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20dockerfile=E4=B8=AD=E7=9A=84=E9=95=9C?= =?UTF-8?q?=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f55c827..ec57d4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,8 @@ RUN pnpm run build FROM node:22 AS production # Set npm registry to Tencent Cloud and install pnpm globally -RUN npm install -g pnpm@latest +RUN pnpm config set registry https://mirrors.cloud.tencent.com/npm/ \ + && npm install -g pnpm@latest # Set the working directory inside the container WORKDIR /usr/src/app @@ -34,8 +35,7 @@ COPY --from=builder /usr/src/app/dist ./dist COPY --from=builder /usr/src/app/package.json /usr/src/app/pnpm-lock.yaml ./ # Install only production dependencies -RUN pnpm config set registry https://mirrors.cloud.tencent.com/npm/ \ - && pnpm install --prod +RUN pnpm install --prod # Expose the application port EXPOSE 3000