From 644f9e6957a76138c8b42df1ae008e6c374f7fe2 Mon Sep 17 00:00:00 2001 From: Blizzard Date: Fri, 17 Jul 2026 15:25:56 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20Dockerfile=20=E6=8D=A2=E5=9B=BD=E5=86=85?= =?UTF-8?q?=E6=BA=90=E5=8A=A0=E9=80=9F=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - npm 用 npmmirror(淘宝源),go 用 goproxy.cn - 大幅缩短 132 上 npm ci / go mod download 耗时 Co-Authored-By: Claude Opus 4.8 --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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/ ./