iloom/gateway/Dockerfile
Chever John 9e25c799d5
fix: use Aliyun Alpine mirror in Dockerfiles
Alpine CDN (dl-cdn.alpinelinux.org) unreachable from DinD containers.
Switch to mirrors.aliyun.com for apk package downloads.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 10:24:59 +08:00

16 lines
469 B
Docker

ARG BASE_REGISTRY=harbor-in-k3s.cheverjohn.me/library
FROM ${BASE_REGISTRY}/golang:1.24-alpine AS builder
ENV GOPROXY=https://goproxy.cn,direct
WORKDIR /app
COPY shared/ ./shared/
COPY gateway/ ./gateway/
WORKDIR /app/gateway
RUN go build -o /gateway ./cmd/
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 wget
COPY --from=builder /gateway /gateway
EXPOSE 8080
CMD ["/gateway"]