mirror of
https://github.com/dredx/prole.git
synced 2026-09-24 18:54:32 +00:00
18 lines
544 B
Docker
18 lines
544 B
Docker
FROM golang:1.22-bookworm AS builder
|
|
WORKDIR /app
|
|
COPY go.mod ./
|
|
# Download deps before copying source so layer is cached separately
|
|
ENV GONOSUMDB=*
|
|
ENV GOFLAGS=-mod=mod
|
|
RUN go mod download
|
|
COPY main.go ./
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -o spnego-proxy .
|
|
|
|
FROM debian:bookworm-slim
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends ca-certificates && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
COPY --from=builder /app/spnego-proxy /usr/local/bin/spnego-proxy
|
|
EXPOSE 4000
|
|
ENTRYPOINT ["/usr/local/bin/spnego-proxy"]
|