diff --git a/Dockerfile b/Dockerfile index 019541b..e2b6b51 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,20 +2,21 @@ FROM node:20-alpine AS web WORKDIR /app/web COPY web/package*.json ./ -RUN npm ci +RUN npm config set registry https://registry.npmmirror.com && npm ci COPY web/ ./ RUN npm run build FROM node:20-alpine AS admin WORKDIR /app/admin COPY admin/package*.json ./ -RUN npm ci +RUN npm config set registry https://registry.npmmirror.com && npm ci COPY admin/ ./ RUN npm run build # ── 2. 编译 Go(embed 两份前端产物)── FROM golang:1.26-alpine AS server WORKDIR /app/server +ENV GOPROXY=https://goproxy.cn,direct COPY server/go.mod server/go.sum ./ RUN go mod download COPY server/ ./