# Build official sources: upstream registry images are no longer public. FROM golang:1.27.3-bookworm@sha256:d9b6a1beb9474adc2a1ce842573639b44b2a0dd49b6669f51d3821baf9ec37c9 AS build ENV GOTOOLCHAIN=local CGO_ENABLED=0 RUN go install -p 4 github.com/minio/minio@v0.0.0-20251015172955-9e49d5e7a648 RUN go install -p 4 github.com/minio/mc@v0.0.0-20250813083541-7394ce0dd2a8 COPY infra/s3-health.go /health.go RUN go build -trimpath -o /healthcheck /health.go FROM alpine:3.23.3@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659 AS tools COPY --from=build /go/bin/mc /usr/bin/mc ENTRYPOINT ["/usr/bin/mc"] FROM scratch AS server COPY --from=build /go/bin/minio /usr/bin/minio COPY --from=build /healthcheck /healthcheck COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt ENTRYPOINT ["/usr/bin/minio"]