From cf765c0543436e4d973a9e24c7afac4ceb0a8461 Mon Sep 17 00:00:00 2001 From: ywp Date: Wed, 22 Oct 2025 15:33:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5aa1a18..b38644c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,10 @@ RUN if [ -f package.json ]; then npm ci --omit=dev; fi FROM docker.1ms.run/nginx:1.27-alpine # 安装 Node.js(给后端运行) -RUN apk add --no-cache nodejs npm bash +# 更换为国内源(清华或阿里云) +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ + && apk update \ + && apk add --no-cache nodejs npm bash WORKDIR /app