diff --git a/Dockerfile b/Dockerfile index b5f5712..360d353 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,14 +17,15 @@ RUN npm config set registry https://registry.npmmirror.com # 安装开发期依赖 COPY package.json ./package.json -RUN npm install +RUN npm install -g pnpm +RUN pnpm config set registry https://registry.npmmirror.com # 构建项目 COPY . . RUN npm run build # 删除开发期依赖 RUN rm -rf node_modules && rm package-lock.json # 安装生产环境依赖 -RUN npm install --production +RUN pnpm install # 如果端口更换,这边可以更新一下 EXPOSE 8001