Best lists

10 Best Minimal Base Images in 2026 (Small, Secure, Fast)

Most scanner CVEs come from packages your app never uses. These ten minimal base images cut that noise, from 0 MB scratch to the pragmatic Alpine.

Cysoro Security TeamPublished · 10 min read
appruntimelibcbase: 2 MB Nothing extra BEST LISTS Minimal base images Small image. Fewer CVEs.
Quick answer

The best minimal base image for most teams is Google distroless: it is free, has no shell or package manager, and ships language-specific variants for Java, Python and Node. Chainguard Images are the best paid option, with zero known CVEs at build time and signed SBOMs. Alpine is the best choice when you need a shell, and scratch is best for fully static binaries.

Key takeaways

  • Distroless is the best free default for most services; Chainguard is the best paid zero-CVE baseline.
  • A minimal base only helps if you rebuild often and scan the final image, not just the base.
  • Alpine is the pragmatic pick when you need a shell, but musl compatibility can bite Python and JVM apps.

Most of the vulnerabilities a scanner reports on your container do not come from your code. They come from operating system packages bundled into the base image that your application never uses. Choosing a minimal base image is the highest-leverage container security decision you make, because it sets the floor for every scan, every patch cycle and every late-night debugging session.

How did we choose these base images?

We compared images on size, shell and package manager presence, libc, CVE counts from Trivy 0.62 scans in May 2026, patch cadence and language support. The CVE numbers are a snapshot from that scan, and they drift with the date, but the relative ordering has been stable for two years.

We did not run our own lab tests. Size and CVE figures come from the published scans and measured builds cited in Sources, and every image here is a real, maintained option you can pull today. Prices are given where the vendor publishes them; most minimal bases are free.

  • Attack surface: no shell and no package manager beats a small image with both.
  • Patch velocity: a zero-CVE scan means little if the image is not rebuilt for months.
  • Compatibility: glibc versus musl decides whether Python and JVM apps just work.
  • Debugging: shell-less images need a debug workflow, not a shell in production.

Best minimal base images compared

Sizes and CVE counts come from Trivy 0.62 scans in late May 2026, as published by Safeguard. CVE counts are high and critical findings at scan time; your counts will differ by date.

Base imageBest forSizeShellCVEs (H/C)Price
Chainguard staticZero-CVE baseline2 MBNo0Free tier; paid for pinned versions
Distroless staticBest free default2 MBNo0Free
Distroless baseglibc apps20 MBNo1Free
Wolfi baseglibc with a shell13 MBYes0Free tier; paid for pinned versions
Ubuntu chiseled.NET and Java teams12 MBNo0Free
UBI microRed Hat shops24 MBNo2Free
AlpineShell and small size8 MBYes0Free
Debian slimEasiest migration75 MBYes9Free
ScratchStatic binaries0 MBNo0Free
Docker Hardened ImagesDocker Hub teamsVariesNoMinimalPaid subscription

A zero on scan day measures patch velocity, not invulnerability. The question is what the count looks like 45 days after you stop rebuilding. For the operational half of the decision, see our small business cybersecurity checklist for the rebuild and patching habits that matter most.

Base image size, from the May 2026 Trivy scanscratch0 MBdistroless static2 MBAlpine 3.228 MBWolfi base13 MBdistroless base20 MBDebian slim75 MBSmaller is not always better — but 75 MB of unused packages is never better.
Base image sizes from the May 2026 scan. Illustration by Cysoro.

The best minimal base images in detail

Each image below lists what it is, when to use it, and what it costs. All of them assume a multi-stage build: compile in a full-featured stage, then copy only the artifact into the minimal final stage.

1. Chainguard static — best zero-CVE baseline

Chainguard static is a 2 MB image for fully static binaries, built on the Wolfi undistro and rebuilt daily from source. Every image ships with a signed SBOM and provenance attestations verifiable with cosign, and Chainguard treats zero known CVEs as a contractual promise rather than a snapshot.

  • Pros: zero high or critical CVEs at scan time; glibc compatibility, so no musl surprises; signed SBOM and provenance for supply-chain compliance.
  • Cons: the free tier only serves latest and latest-dev tags, so pinning to a specific version needs a paid plan.

Pricing: free tier available; paid plan required for pinned versions as of November 2026. Pick it if: your customers contractually require clean scans or you need SLSA-level supply-chain evidence.

2. Distroless static — best free default

Google distroless static is the free workhorse: 2 MB, no shell, no package manager, and it includes CA certificates and timezone data that scratch lacks. It is the image most teams should reach for by default for static binaries.

  • Pros: free; zero CVEs at scan time; maintained by Google with regular Debian-based patching; use the nonroot tag to avoid running as UID 0.
  • Cons: patch cadence follows Debian point releases, so a glibc CVE can sit visible in scanners longer than with Chainguard or Ubuntu.

Pricing: free as of November 2026. Pick it if: you want the safest free default for a static Go or Rust service.

3. Distroless base — best for glibc apps

Distroless base adds glibc, CA certificates and timezone data to the static image, at about 20 MB, for applications that need a C library. Language variants exist for Java, Python and Node, plus a cc variant that adds libgcc.

  • Pros: free; covers most runtimes with one pattern; no shell or package manager in the final image.
  • Cons: one high or critical CVE at scan time; still no shell for debugging, so you need an ephemeral debug workflow.

Pricing: free as of November 2026. Pick it if: your app needs glibc but nothing else from a distribution.

4. Wolfi base — best glibc image with a shell

Wolfi base is Chainguard's 13 MB glibc image with a shell and apk package manager, built from the same Wolfi undistro as Chainguard Images. It had zero high or critical CVEs at scan time, and it is the middle ground between a full distro and a shell-less image.

  • Pros: glibc compatibility with a shell for setup and debugging; zero CVEs at scan time; rolling updates from source.
  • Cons: the shell and package manager add attack surface; pinning versions needs a paid Chainguard plan.

Pricing: free tier available; paid plan required for pinned versions as of November 2026. Pick it if: you want Chainguard's patch velocity but still need a shell at build time.

5. Ubuntu chiseled — best for .NET and Java teams

Ubuntu chiseled images carve packages into slices to produce shell-less runtime images backed by Canonical's CVE patching, with FIPS-certified crypto available under Ubuntu Pro. The chiseled runtime measured about 12 MB with zero high or critical CVEs at scan time.

  • Pros: free; enterprise patching and support from Canonical; Microsoft publishes chiseled .NET images directly, so .NET teams get the lowest-friction path.
  • Cons: less useful outside the Ubuntu and .NET ecosystem; slices take some learning.

Pricing: free as of November 2026, with Ubuntu Pro available for FIPS and extended support. Pick it if: you already run Ubuntu or .NET and want a minimal image without changing vendors.

6. Red Hat UBI micro — best for Red Hat shops

UBI micro is Red Hat's freely redistributable minimal image, about 24 MB with no shell and no package manager. You install packages at build time with dnf on the build host, and CVE response is backed by Red Hat errata.

  • Pros: free and redistributable; vendor-supported answer for security questionnaires; Red Hat errata dates for every CVE.
  • Cons: two moderate-severity CVEs at scan time; larger than distroless or chiseled options.

Pricing: free as of November 2026. Pick it if: your customers ask whether the base OS is vendor-supported, and the honest answer matters more than the CVE count.

7. Alpine — best when you need a shell

Alpine Linux is about 8 MB with a real ash shell and the apk package manager, and it had zero high or critical CVEs at scan time. In measured September 2026 builds, a Flask app was smallest on Alpine at 24.2 MB, ahead of distroless at 28.4 MB and Chainguard Python at 34.2 MB.

  • Pros: tiny and fast to pull; real shell for debugging; huge package repository for build-time needs.
  • Cons: musl libc instead of glibc can break Python wheels and threaded workloads; some packages lack musl builds and fail to compile; a smaller security team than Debian or Canonical.

Pricing: free as of November 2026. Pick it if: you need a shell and a package manager in a small image, and you have checked musl compatibility for your stack. Measured build results are published in the Wolfi vs Alpine vs distroless measurements.

8. Debian slim — best for the easiest migration

Debian slim strips documentation and extras from full Debian, leaving a familiar glibc image with apt at about 75 MB. It is the least reduction of any image here, but also the least change: existing Dockerfiles usually work unchanged.

  • Pros: free; full glibc compatibility; apt and a shell, so nothing about your workflow changes.
  • Cons: nine high or critical CVEs at scan time, the most of any minimal option here; 75 MB of packages your app may never use.

Pricing: free as of November 2026. Pick it if: you need the fastest migration to a smaller image and plan to move to distroless later.

9. Scratch — best for static binaries

Scratch is the empty image: 0 MB, no shell, no package manager, no libc, and zero CVEs by definition because there are no OS packages to scan. It only works for fully static Go or Rust binaries.

  • Pros: the theoretical optimum for attack surface; no OS packages means no OS CVEs.
  • Cons: you supply CA certificates and timezone data yourself; the moment you need TLS, distroless static does the same job with a maintained update path.

Pricing: free as of November 2026. Pick it if: your binary is fully static and needs nothing from an operating system.

10. Docker Hardened Images — best for Docker Hub teams

Docker Hardened Images, launched in 2025, follow the Chainguard playbook — minimal, attested and patched — inside Docker Hub's own distribution. They are worth evaluating if you already pay for Docker, though the catalog is younger than Chainguard's or distroless.

  • Pros: minimal and attested images without leaving Docker Hub; fits teams already on Docker subscriptions.
  • Cons: paid subscription; younger catalog with fewer images than the established options.

Pricing: paid subscription as of November 2026. Pick it if: you already pay Docker and want hardened images in the registry you already use.

How do you choose a minimal base image?

Start with your language, not the size chart. A static Go binary belongs on distroless static or Chainguard static. A Python app belongs on distroless Python, Chainguard Python or Alpine, but only after you check that every dependency ships a wheel for your libc. A JVM or .NET app belongs on distroless Java or Ubuntu chiseled.

Pick by language firstStatic Go or Rustdistroless static orChainguard staticPython, Node, Javadistroless language imageor Chainguard equivalentNeed a shell?Alpine or Wolfi base —then check musl vs glibcThen pin by digest, rebuild weekly, and scan the final image.
Language first, shell second, size third. Illustration by Cysoro.

Then decide how much support you need. If your customers demand clean scans or supply-chain attestations, Chainguard earns its price. If you are inside the Red Hat or Ubuntu world, UBI micro or chiseled answers the vendor-support question. If you just want fewer scanner findings for free, distroless is the default.

Finally, plan the operational half. Pin the base by digest, let Renovate or Dependabot bump it, rebuild weekly, and scan the final image rather than the base alone, because your application layers reintroduce packages the base never had. If those images run in the cloud, our guide to the best cloud security for small business covers the posture tools that watch them once they are deployed.

Free vs paid minimal base images: what is the difference?

Free minimal images — distroless, Alpine, Debian slim, scratch, UBI micro, chiseled — cost nothing and cut your CVE count a long way. What they do not give you is a promise: patch timing follows the upstream project, and nobody guarantees a zero-CVE scan on a given day.

Paid images — Chainguard and Docker Hardened Images — sell patch velocity and evidence. Chainguard rebuilds daily, promises zero known CVEs at build time, and ships signed SBOMs and provenance attestations. If your team spends hours triaging base-image findings, or your customers contractually require clean scans, that subscription is cheaper than the toil.

If your scanner noise is dominated by application dependencies rather than OS packages, fix that first. A paid base image will not move your real risk much, and the free options will do. The comparison data behind this section is published in the 2026 container base image comparison.

What should you avoid with minimal base images?

Avoid pinning a perfect base for six months. A base image pinned in January is a bad base image by July, whatever its scan said on day one. Rebuild on a schedule and let automation bump the digest.

Avoid running as root for no reason. Use the nonroot tags on distroless and Chainguard images, and set a non-root user in every Dockerfile. Avoid copying a shell into a shell-less image just for debugging: use kubectl debug with an ephemeral container instead.

Avoid picking Alpine because the number looks good. Measure your actual app: in the September 2026 measured builds, some Python packages had no musl wheels and failed to build on Alpine at all. And avoid scanning only the base — scan the final image, because that is what you ship.

The bottom line

For most teams, distroless is the right default: free, shell-free, and available for every common language. Chainguard is the right upgrade when clean scans and supply-chain evidence are worth paying for, and Alpine is the right choice when you genuinely need a shell.

Whichever you pick, the base image is only half the job. Rebuild weekly, pin by digest, run as non-root, and scan the final image. You can verify the files your build produces with our free hash generator when you need to confirm exactly what shipped.

Frequently asked questions

What is a minimal base image?

A minimal base image is a small container image with only the files needed to run an application, and no shell, package manager or extra tools. Smaller images have fewer packages, so scanners report fewer vulnerabilities, images pull faster, and attackers have less to exploit.

What is the smallest Docker base image?

Scratch is the smallest, at 0 MB, because it is completely empty. For a usable image, Chainguard static and distroless static are about 2 MB, Alpine is about 8 MB, and a Debian slim image is about 75 MB. The application layers you add matter more than the base once you ship.

Is Alpine still a good base image in 2026?

Yes, with eyes open. Alpine is about 8 MB, has a real shell and apk, and had zero high or critical CVEs in a May 2026 Trivy scan. Its cost is musl libc instead of glibc, which can break Python wheels and threaded workloads, so measure before committing.

What is the difference between distroless and Chainguard?

Both are shell-free and minimal. Distroless is Google's free Debian-based image with a patch cadence that follows Debian point releases. Chainguard Images are built daily from source on Wolfi, promise zero known CVEs at build time, and ship signed SBOMs and provenance, but pinning to a specific version needs a paid plan.

How do I debug a container with no shell?

Use an ephemeral debug container, such as kubectl debug with a busybox image attached to the running pod, instead of shipping a shell in production. You get full tools for the session and nothing extra in the deployed image.

What is a chiseled Ubuntu image?

Ubuntu chiseled images carve Debian-family packages into slices, producing shell-less runtime images backed by Canonical patching. They are the lowest-friction minimal option for .NET and Java teams already on Ubuntu, and Microsoft publishes chiseled .NET images directly.

Should I use scratch for my app?

Only for fully static binaries, such as a Go or Rust binary built with no dynamic libraries. The moment you need TLS certificates or timezone data, you are copying them in yourself, and distroless static or Chainguard static does the same job with a maintained update path.

How often should I rebuild my base image?

Rebuild on a schedule, not only on release. Weekly rebuilds pick up base patches even when your code has not changed, and pinning by digest with Renovate or Dependabot updating the digest keeps builds reproducible and fresh.

Sources

  1. Safeguard — Best Container Base Images for Security 2026
  2. Safeguard — Minimal Base Images for Security (2026 Guide)
  3. Jacares — Wolfi vs Alpine vs distroless, measured in Docker
  4. Botmonster — Docker image hardening: minimal bases, non-root, and Trivy scans
  5. Denis Iakimenko — Docker Base Images: bookworm-slim, alpine, distroless, Chainguard Wolfi
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against Trivy 0.62 scan results from May 2026 and measured Docker builds from September 2026, plus vendor documentation for Chainguard, distroless, Alpine, Ubuntu and Red Hat images.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free