access-engine/Containerfile.lifecycle
tegwick 16ca97b277
Some checks failed
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
Build and Publish Container Image / build-and-push (push) Failing after 1m2s
Complete renamed image source and verify bounded consumer migration readiness
Assistant: codex
Assistant-Model: gpt-6.1-sol
Assistant-Session: 01a126e1-76f8-7643-8cf3-e93336539ade
2026-10-11 23:25:19 +02:00

17 lines
1.1 KiB
Text

# Same pinned engine build; candidate policies are included by COPY examples.
FROM golang:1.26.7-alpine@sha256:28d89ee9cc0ff9fec75c82ca201e6bf7fdf9a679d4b7b24dfa04f2bb766bb468 AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/access-engine ./cmd/access-engine && 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
COPY --from=build /out/access-engine /usr/local/bin/access-engine
COPY --from=build /out/flex-auth /usr/local/bin/flex-auth
COPY examples /opt/access-engine/examples
# Existing pinned releases still pass these paths during the side-by-side migration.
COPY examples /opt/flex-auth/examples
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/access-engine"]
CMD ["serve", "--addr", "0.0.0.0:8080", "--registry", "/opt/access-engine/examples/tenant-engine/registry_snapshot.json", "--policy", "/opt/access-engine/examples/tenant-engine/policy_package.md"]