Something went wrong. Try again.
/x/perimental project monorepo
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435FROM golang:1.25 AS buildWORKDIR /app
# Cache module downloadCOPY go.mod go.sum ./RUN go mod download
# Copy source and build the iamd binaryCOPY . .RUN --mount=type=cache,target=/root/.cache \ GOBIN=/app/bin \ go install ./cmd/iamd
FROM debian:bookworm AS runtimeWORKDIR /app
# Minimal runtime dependenciesRUN apt-get update && apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* \ && cp /etc/ssl/certs/ca-certificates.crt . \ && mkdir -p /data
COPY --from=build /app/bin/iamd /app/bin/iamd
# SQLite database lives on /data so it survives container replacement.VOLUME /data
# 9080: IAM/STS Twirp API, 9081: Prometheus metricsEXPOSE 9080 9081
CMD ["/app/bin/iamd", "-db-loc", "/data/iamd.db"]
LABEL org.opencontainers.image.source="https://github.com/Xe/x"