Files
gitea-mcp-forward-auth/Dockerfile
T
torben 1acdbb5519
Build and Test / verify (push) Failing after 1m22s
Update build configuration and improve token handling
- Change CI container image to debian:trixie-slim and set GOPROXY.
- Update Go version to 1.26 in Dockerfile and go.mod.
- Refactor token validation to use SHA-256 hashes instead of plain tokens.
- Add network policy to restrict access to the service.
- Enhance README with new configuration details and usage examples.
- Add tests for new token hash validation logic.
2026-07-11 22:08:56 +02:00

25 lines
573 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
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"]