From 70798e3dfd5244f4a255e08e7de8f5de94eb617f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=B9=E5=A6=B9=E4=B8=8B=E9=9B=A8=E5=9B=9E=E4=B8=8D?= =?UTF-8?q?=E5=8E=BB?= Date: Mon, 4 Jul 2022 18:06:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(nginx):=20=E6=9B=B4=E6=96=B0alpine=E9=95=9C?= =?UTF-8?q?=E5=83=8F=EF=BC=8C?= 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 10a6288..44dc03f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,11 @@ RUN mkdir -p /apps COPY . /apps WORKDIR /apps ## 安装依赖 -RUN npm i --registry https://registry.npmmirror.com && npm run build +RUN npm ci --registry https://registry.npmmirror.com && npm run build -# 设置部署镜像 -FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:latest + +FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:1.23.0-alpine # 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 注意:--from参数 COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/