From c7df895bbbcd2f3c2a902a2ec854e0da1ddf21c8 Mon Sep 17 00:00:00 2001 From: 82030615 <82030615@qq.com> Date: Mon, 21 Sep 2026 20:20:54 +0700 Subject: [PATCH] build(docker): apply the apk mirror swap to the runner stage - Add apk mirror swap to mirrors.aliyun.com at the top of runner stage - Prevents docker build hanging when dl-cdn.alpinelinux.org is unreachable --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index dfcee598..547be9dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,10 @@ RUN npm run build FROM ${NODE_IMAGE} AS runner WORKDIR /app +# The base stage's mirror swap does not reach here: runner starts from +# ${NODE_IMAGE} directly, so the apk upgrade below would go to +# dl-cdn.alpinelinux.org and hang forever on networks that cannot reach it. +RUN sed -i 's|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g' /etc/apk/repositories LABEL org.opencontainers.image.title="9router"