From 7a8df1f0d492814aef21944432cfa44c5c4d8db7 Mon Sep 17 00:00:00 2001 From: Chever John Date: Wed, 17 Jun 2026 10:25:02 +0800 Subject: [PATCH] fix: use Aliyun Alpine mirror in Dockerfiles Alpine CDN unreachable from DinD containers. Switch to mirrors.aliyun.com for both builder and runtime stages. Co-Authored-By: Claude --- deploy/Dockerfile.gateway | 2 ++ deploy/Dockerfile.inventory | 2 ++ deploy/Dockerfile.system | 2 ++ 3 files changed, 6 insertions(+) diff --git a/deploy/Dockerfile.gateway b/deploy/Dockerfile.gateway index fc85a72..5a3daf9 100644 --- a/deploy/Dockerfile.gateway +++ b/deploy/Dockerfile.gateway @@ -1,6 +1,7 @@ ARG BASE_REGISTRY=harbor-in-k3s.cheverjohn.me/library FROM ${BASE_REGISTRY}/golang:1.24-alpine AS builder ENV GOPROXY=https://goproxy.cn,direct +RUN sed -i "s|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g" /etc/apk/repositories RUN apk add --no-cache git WORKDIR /app COPY go.mod go.sum ./ @@ -9,6 +10,7 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /server ./gateway/gateway.go FROM ${BASE_REGISTRY}/alpine:3.20 +RUN sed -i "s|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g" /etc/apk/repositories RUN apk add --no-cache ca-certificates tzdata WORKDIR /app COPY --from=builder /server ./gateway diff --git a/deploy/Dockerfile.inventory b/deploy/Dockerfile.inventory index 61f6c64..be680ef 100644 --- a/deploy/Dockerfile.inventory +++ b/deploy/Dockerfile.inventory @@ -1,6 +1,7 @@ ARG BASE_REGISTRY=harbor-in-k3s.cheverjohn.me/library FROM ${BASE_REGISTRY}/golang:1.24-alpine AS builder ENV GOPROXY=https://goproxy.cn,direct +RUN sed -i "s|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g" /etc/apk/repositories RUN apk add --no-cache git WORKDIR /app COPY go.mod go.sum ./ @@ -9,6 +10,7 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /server ./rpc/inventory/inventory.go FROM ${BASE_REGISTRY}/alpine:3.20 +RUN sed -i "s|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g" /etc/apk/repositories RUN apk add --no-cache ca-certificates tzdata WORKDIR /app COPY --from=builder /server ./inventory diff --git a/deploy/Dockerfile.system b/deploy/Dockerfile.system index 875f181..f6de550 100644 --- a/deploy/Dockerfile.system +++ b/deploy/Dockerfile.system @@ -1,6 +1,7 @@ ARG BASE_REGISTRY=harbor-in-k3s.cheverjohn.me/library FROM ${BASE_REGISTRY}/golang:1.24-alpine AS builder ENV GOPROXY=https://goproxy.cn,direct +RUN sed -i "s|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g" /etc/apk/repositories RUN apk add --no-cache git WORKDIR /app COPY go.mod go.sum ./ @@ -9,6 +10,7 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /server ./rpc/system/system.go FROM ${BASE_REGISTRY}/alpine:3.20 +RUN sed -i "s|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g" /etc/apk/repositories RUN apk add --no-cache ca-certificates tzdata WORKDIR /app COPY --from=builder /server ./system