From fb7a7236207d80c77378da2018ca48f1a39e07d3 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 18 Aug 2024 09:19:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20web/Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/web/Dockerfile b/web/Dockerfile index bd09f892..7b1185ac 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -2,12 +2,15 @@ FROM node:16 WORKDIR /gva_web/ COPY . . +RUN yarn config set registry https://mirrors.huaweicloud.com/repository/npm/ +RUN yarn && yarn build #RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories #RUN apk add npm -RUN npm config set registry https://mirrors.huaweicloud.com/repository/npm/ -RUN npm i cnpm -g -RUN cnpm install -RUN npm run build +#RUN npm config set registry https://mirrors.huaweicloud.com/repository/npm/ +#RUN npm i cnpm -g +#RUN cnpm install +#RUN npm run build + FROM nginx:alpine LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com" @@ -16,4 +19,4 @@ COPY .docker-compose/nginx/conf.d/my.conf /etc/nginx/conf.d/my.conf COPY --from=0 /gva_web/dist /usr/share/nginx/html RUN cat /etc/nginx/nginx.conf RUN cat /etc/nginx/conf.d/my.conf -RUN ls -al /usr/share/nginx/html +RUN ls -al /usr/share/nginx/html \ No newline at end of file