FROM golang:1.25-alpine AS build WORKDIR /src # 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 -o /file-svc ./cmd/server FROM alpine:3.20 RUN apk add --no-cache ca-certificates tzdata COPY --from=build /file-svc /file-svc EXPOSE 8080 ENTRYPOINT ["/file-svc"]