Reduce container attack surface by building application images on Google distroless base images that contain only the application runtime with no shell, package manager, or unnecessary OS utilities.
Automate repetitive workflows and reduce manual effort
Example: Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example: Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example: Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Time estimate: 15-45 minutes depending on use case complexity
Prerequisites
Submit your Claude Code skill and start earning
epx add mukul975/Anthropic-Cybersecurity-Skills/implementing-container-image-minimal-base-with-distrolessCompatible with
Supported agents
| name | implementing-container-image-minimal-base-with-distroless |
| description | Reduce container attack surface by building application images on Google distroless base images that contain only the application runtime with no shell, package manager, or unnecessary OS utilities. |
| domain | cybersecurity |
| subdomain | container-security |
| tags | - distroless - container-images - minimal-base - attack-surface - docker - security-hardening - supply-chain - kubernetes |
| version | '1.0' |
| author | mahipal |
| license | Apache-2.0 |
| nist_csf | - PR.PS-01 - PR.IR-01 - ID.AM-08 - DE.CM-01 |
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.
| 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 |
# Build stage
FROM golang:1.22-bookworm AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /server ./cmd/server
# Runtime stage - static distroless
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=builder /server /server
USER nonroot:nonroot
ENTRYPOINT ["/server"]
# Build stage
FROM maven:3.9-eclipse-temurin-21 AS builder
WORKDIR /app
COPY pom.xml .
RUN mvn dependency:go-offline
COPY src ./src
RUN mvn package -DskipTests
# Runtime stage - Java distroless
FROM gcr.io/distroless/java21-debian12:nonroot
COPY --from=builder /app/target/app.jar /app.jar
USER nonroot:nonroot
ENTRYPOINT ["java", "-jar", "/app.jar"]
# Build stage
FROM python:3.12-bookworm AS builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --target=/deps -r requirements.txt
COPY . .
# Runtime stage - Python distroless
FROM gcr.io/distroless/python3-debian12:nonroot
WORKDIR /app
COPY --from=builder /deps /deps
COPY --from=builder /app /app
ENV PYTHONPATH=/deps
USER nonroot:nonroot
ENTRYPOINT ["python3", "/app/main.py"]
# Build stage
FROM node:22-bookworm AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
# Runtime stage - Node distroless
FROM gcr.io/distroless/nodejs22-debian12:nonroot
WORKDIR /app
COPY --from=builder /app .
USER nonroot:nonroot
CMD ["server.js"]
| Component | Ubuntu | Alpine | Distroless |
|---|---|---|---|
| Shell (bash/sh) | Yes | Yes | No |
| Package manager | apt | apk | No |
| coreutils | Full | BusyBox | No |
| curl/wget | Yes | Yes | No |
| User management | Yes | Yes | No |
| Known CVEs (typical) | 50-200+ | 5-20 | 0-5 |
| Image size (base) | ~77MB | ~7MB | ~2-20MB |
cat, ls, find, curl for reconnaissance:nonroot tag runs as UID 65534Since distroless has no shell, use these techniques for debugging:
# Use debug variant in non-production environments only
FROM gcr.io/distroless/base-debian12:debug
# Includes busybox shell at /busybox/sh
# Exec into debug variant
kubectl exec -it pod-name -- /busybox/sh
# Attach a debug container with full tooling
kubectl debug -it pod-name --image=busybox:1.36 --target=app-container
# Inspect image layers without running
crane export gcr.io/distroless/static-debian12 - | tar -tf - | head -50
# Analyze image layers
dive gcr.io/distroless/static-debian12
Typical vulnerability comparison using Trivy:
# Scan Ubuntu-based image
trivy image myapp:ubuntu
# Result: 47 vulnerabilities (3 CRITICAL, 12 HIGH)
# Scan Distroless-based image
trivy image myapp:distroless
# Result: 2 vulnerabilities (0 CRITICAL, 0 HIGH)
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionimplementing-container-image-minimal-base-with-distrolessExecute the skills CLI command in your project's root directory to begin installation:
epx add mukul975/Anthropic-Cybersecurity-Skills/implementing-container-image-minimal-base-with-distrolessFetches implementing-container-image-minimal-base-with-distroless from mukul975/Anthropic-Cybersecurity-Skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
.cursor/skills/implementing-container-image-minimal-base-with-distroless
Restart Cursor to activate implementing-container-image-minimal-base-with-distroless. Access via /implementing-container-image-minimal-base-with-distrolessin your agent's command palette.
Learn more:View source on GitHubSkills CLI docsAbout CursorWhat are agent skills?
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
deobfuscating-javascript-malware
mukul975/Anthropic-Cybersecurity-Skills · deobfuscating-javascript-malware · same repo
performing-mobile-device-forensics-with-cellebrite
mukul975/Anthropic-Cybersecurity-Skills · performing-mobile-device-forensics-with-cellebrite · same repo
hunting-credential-stuffing-attacks
mukul975/Anthropic-Cybersecurity-Skills · hunting-credential-stuffing-attacks · same repo
generating-threat-intelligence-reports
mukul975/Anthropic-Cybersecurity-Skills · generating-threat-intelligence-reports · same repo
implementing-api-gateway-security-controls
mukul975/Anthropic-Cybersecurity-Skills · implementing-api-gateway-security-controls · same repo
performing-hardware-security-module-integration
mukul975/Anthropic-Cybersecurity-Skills · performing-hardware-security-module-integration · same repo
implementing-container-image-minimal-base-with-distroless is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
implementing-container-image-minimal-base-with-distroless fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
We added implementing-container-image-minimal-base-with-distroless from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
implementing-container-image-minimal-base-with-distroless reduced setup friction for our internal harness; good balance of opinion and flexibility.
implementing-container-image-minimal-base-with-distroless has been reliable in day-to-day use. Documentation quality is above average for community skills.
Solid pick for teams standardizing on skills: implementing-container-image-minimal-base-with-distroless is focused, and the summary matches what you get after install.
I recommend implementing-container-image-minimal-base-with-distroless for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Useful defaults in implementing-container-image-minimal-base-with-distroless — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Solid pick for teams standardizing on skills: implementing-container-image-minimal-base-with-distroless is focused, and the summary matches what you get after install.
implementing-container-image-minimal-base-with-distroless has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 55