Custom distroless Docker base image

A minimal, security-hardened base image for production containers, published at ghcr.io/morningstar-sudo/distroless-base:latest.

Why distroless?

How it's built

Using it

Build your application in a full-featured stage, then copy the binary onto the distroless base:

# Build stage: full toolchain
FROM golang:1.24-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /app ./cmd/server

# Runtime stage: distroless base — no shell, no package manager
FROM ghcr.io/morningstar-sudo/distroless-base:latest
COPY --from=build /app /app
USER nonroot
ENTRYPOINT ["/app"]

All published images are listed in the image catalog.