Files
flatrender/services/gateway/Dockerfile
T
soroush.asadi b34904549f
CI/CD / CI · Web (tsc) (push) Successful in 1m8s
CI/CD / Deploy · full stack (push) Failing after 3m26s
ci(build): pull golang base image from kargadan mirror
mirror.soroushasadi.com serves only cached images (node:20 resolved, golang:1.25
was 'not found' — too new to be cached, upstream can't back-fill). Point the Go
services' golang:1.25-alpine base at mirror.kargadan.ir per infra owner; alpine/
busybox/node/postgres/minio stay on soroushasadi (cached). GOPROXY already kargadan.
2026-06-12 16:47:31 +03:30

15 lines
594 B
Docker

FROM mirror.kargadan.ir/golang:1.25-alpine AS builder
# Go module/toolchain fetches via the kargadan Nexus (proxy.golang.org geo-blocked).
ENV GOPROXY=https://mirror.kargadan.ir/repository/go-group/ GOSUMDB=off
WORKDIR /app
# Dependencies are vendored — build fully offline (proxy.golang.org is geo-blocked from some regions)
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -ldflags="-s -w" -o gateway ./cmd/server
FROM mirror.soroushasadi.com/alpine:3.20
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY --from=builder /app/gateway .
EXPOSE 8080
CMD ["./gateway"]