cb11c177a7
The CI server can't reach dl-cdn.alpinelinux.org (TLS error) — only the Nexus mirror is reachable, and it proxies Docker images, not apk packages. - frontend: drop `apk add libc6-compat` (vestigial Next.js-template line; the deps stage only runs `npm ci` and the build/runtime stages never had it). - 5 Go services (file/gateway/notification/payment/render): replace `apk add ca-certificates tzdata` with copying ca-certificates.crt from the golang builder stage + embedding tzdata via `go build -tags timetzdata`. No more apk -> no dependency on the Alpine CDN. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
14 lines
597 B
Docker
14 lines
597 B
Docker
FROM mirror.kargadan.ir/golang:1.25-alpine AS builder
|
|
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 -tags timetzdata -mod=vendor -ldflags="-s -w" -o notification-svc ./cmd/server
|
|
|
|
FROM mirror.soroushasadi.com/alpine:3.20
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
WORKDIR /app
|
|
COPY --from=builder /app/notification-svc .
|
|
EXPOSE 8080
|
|
CMD ["./notification-svc"]
|