diff --git a/Dockerfile b/Dockerfile index c204410..5cf28bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,10 @@ COPY package.json . COPY package-lock.json* . # 设置npm镜像 -RUN npm config set registry https://registry.npmmirror.com/ && \ - npm install +RUN npm config set registry https://registry.npmmirror.com + +RUN npm install -g pnpm +RUN pnpm config set registry https://registry.npmmirror.com COPY . . @@ -24,8 +26,8 @@ COPY --from=builder /app/package.json . COPY --from=builder /app/bootstrap.js . # 设置npm镜像 -RUN npm config set registry https://registry.npmmirror.com/ && \ - npm install --production +RUN pnpm config set registry https://registry.npmmirror.com +RUN pnpm install --production ENV NODE_ENV=production ENV PORT=8001