diff --git a/web/Dockerfile b/web/Dockerfile index dfa65f7d..56d25692 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,12 +1,11 @@ -FROM node:18 +FROM alpine:latest WORKDIR /gva_web/ COPY . . -RUN npm config set registry https://registry.npm.taobao.org -RUN npm install -g yarn@latest -RUN yarn config set registry https://registry.npm.taobao.org -RUN yarn install -RUN 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://npm.aliyun.com +RUN npm install && npm run build FROM nginx:alpine LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"