access-engine/Containerfile

14 lines
716 B
Text
Raw Normal View History

FROM golang:1.26.7-alpine@sha256:28d89ee9cc0ff9fec75c82ca201e6bf7fdf9a679d4b7b24dfa04f2bb766bb468 AS build
2026-08-09 01:35:30 +02:00
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/flex-auth ./cmd/flex-auth
FROM gcr.io/distroless/static-debian12:nonroot@sha256:afa5c872c891853ca7fcf1f12c3edb23f7eeef36189728842dd51042ff57f7ab
2026-08-09 01:35:30 +02:00
COPY --from=build /out/flex-auth /usr/local/bin/flex-auth
COPY examples /opt/flex-auth/examples
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/flex-auth"]
CMD ["serve", "--addr", "0.0.0.0:8080", "--registry", "/opt/flex-auth/examples/tenant-engine/registry_snapshot.json", "--policy", "/opt/flex-auth/examples/tenant-engine/policy_package.md"]