Files
gitea-mcp-forward-auth/Dockerfile
T
torben 9ab31a9827
Build and Test / verify (push) Successful in 32s
Build and Push Container Image / build-and-push-image (push) Successful in 50s
Fix Dockerfile by re-adding GOPROXY_URL argument for clarity
2026-07-12 17:52:57 +02:00

26 lines
589 B
Docker

ARG GO_VERSION=1.26
ARG GOPROXY_URL=https://gitea.nehmer.net/api/packages/torben/go,https://proxy.golang.org,direct
FROM golang:${GO_VERSION}-bookworm AS build
WORKDIR /src
ARG GOPROXY_URL
ENV GOPROXY=${GOPROXY_URL}
COPY go.mod ./
RUN go mod download
COPY . .
ARG TARGETOS=linux
ARG TARGETARCH=amd64
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
go build -trimpath -ldflags="-s -w" -o /out/authproxy ./cmd/authproxy
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=build /out/authproxy /authproxy
EXPOSE 8080
USER nonroot:nonroot
ENTRYPOINT ["/authproxy"]