Docker Hub and proxy.golang.org are unreachable from k3s cluster (GFW). Switch all Dockerfiles to pull base images from Harbor (harbor-in-k3s.cheverjohn.me/library/) and use goproxy.cn for Go module downloads. Co-Authored-By: Claude <noreply@anthropic.com>
15 lines
444 B
Docker
15 lines
444 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 textile-service/ ./textile-service/
|
|
WORKDIR /app/textile-service
|
|
RUN go build -o /textile-service ./cmd/
|
|
|
|
FROM ${BASE_REGISTRY}/alpine:3.20
|
|
RUN apk add --no-cache wget
|
|
COPY --from=builder /textile-service /textile-service
|
|
EXPOSE 8083
|
|
CMD ["/textile-service"]
|