Each rewritten description now states both what the skill does (concrete
capability, named tools/artifacts) and an explicit when-to-use trigger,
improving agent discovery/activation. Grounded in each skill's own body;
changes confined to the `description` field only (bodies and all other
frontmatter untouched). Produced by a gated audit->rewrite->recheck loop
(548 -> 0 flagged) with a sampled anti-invention check (0 ungrounded).
Schema: 817/817 pass. Framework-ID gate: 0 defects.
Reduces container attack surface by building application images on Google distroless base images that contain only the app runtime with no shell, package manager, or OS utilities, using multi-stage Docker build patterns and debug/scanning techniques for distroless containers. Use when hardening container images, cutting attack surface in a container security architecture, or responding to a security assessment that flags bloated base images.
cybersecurity
container-security
distroless
container-images
minimal-base
attack-surface
docker
security-hardening
supply-chain
kubernetes
1.0
mahipal
Apache-2.0
PR.PS-01
PR.IR-01
ID.AM-08
DE.CM-01
T1610
T1611
T1609
T1525
T1195
Implementing Container Image Minimal Base with Distroless
Overview
Google distroless images contain only your application and its runtime dependencies, without package managers, shells, or other programs found in standard Linux distributions. By eliminating unnecessary OS components, distroless images achieve up to 95% reduction in attack surface compared to traditional base images like ubuntu or debian. Major projects including Kubernetes itself, Knative, and Tekton use distroless images in production. As of 2025, Docker also offers Hardened Images (DHI) as an open-source alternative for minimal container bases.
When to Use
When deploying or configuring implementing container image minimal base with distroless capabilities in your environment
When establishing security controls aligned to compliance requirements
When building or improving security architecture for this domain
When conducting security assessments that require this implementation
Prerequisites
Docker 20.10+ or compatible container build tool (Buildah, Kaniko)
Multi-stage Dockerfile knowledge
Application compiled as a static binary or with runtime bundled
Container registry for image storage
Available Distroless Images
Image
Use Case
Size
gcr.io/distroless/static-debian12
Statically compiled binaries (Go, Rust)
~2MB
gcr.io/distroless/base-debian12
Dynamically linked binaries needing glibc
~20MB
gcr.io/distroless/cc-debian12
C/C++ applications needing libstdc++
~25MB
gcr.io/distroless/java21-debian12
Java 21 applications
~220MB
gcr.io/distroless/python3-debian12
Python 3 applications
~50MB
gcr.io/distroless/nodejs22-debian12
Node.js 22 applications
~130MB
Multi-Stage Build Patterns
Go Application
# Build stageFROMgolang:1.22-bookwormASbuilderWORKDIR/appCOPY go.mod go.sum ./RUN go mod downloadCOPY . .RUNCGO_ENABLED=0GOOS=linux go build -ldflags="-s -w" -o /server ./cmd/server# Runtime stage - static distrolessFROMgcr.io/distroless/static-debian12:nonrootCOPY --from=builder /server /serverUSERnonroot:nonrootENTRYPOINT["/server"]