FROM golang:1.25-alpine AS build WORKDIR /src # GOPRIVATE — Go должен фетчить portal-common напрямую, минуя proxy.golang.org. ENV GOPRIVATE=gitea.estateliga.work RUN apk add --no-cache git COPY go.mod go.sum ./ RUN go mod download COPY . . RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /learning-server ./cmd/server FROM gcr.io/distroless/static-debian12 COPY --from=build /learning-server /learning-server COPY migrations /migrations EXPOSE 3001 ENTRYPOINT ["/learning-server"]