更新 web/Dockerfile
Docker Deploy / build-and-deploy (push) Failing after 3m33s Details

This commit is contained in:
root 2024-08-18 09:19:40 +08:00
parent aab5f1ca5d
commit fb7a723620
1 changed files with 8 additions and 5 deletions

View File

@ -2,12 +2,15 @@ FROM node:16
WORKDIR /gva_web/ WORKDIR /gva_web/
COPY . . 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 sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
#RUN apk add npm #RUN apk add npm
RUN npm config set registry https://mirrors.huaweicloud.com/repository/npm/ #RUN npm config set registry https://mirrors.huaweicloud.com/repository/npm/
RUN npm i cnpm -g #RUN npm i cnpm -g
RUN cnpm install #RUN cnpm install
RUN npm run build #RUN npm run build
FROM nginx:alpine FROM nginx:alpine
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com" 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 COPY --from=0 /gva_web/dist /usr/share/nginx/html
RUN cat /etc/nginx/nginx.conf RUN cat /etc/nginx/nginx.conf
RUN cat /etc/nginx/conf.d/my.conf RUN cat /etc/nginx/conf.d/my.conf
RUN ls -al /usr/share/nginx/html RUN ls -al /usr/share/nginx/html