We're trying to clean up the base images used across our Kubernetes clusters. Vulnerability scans keep reporting hundreds of inherited CVEs from upstream images before our application code is even added, which creates a lot of triage work.
We've moved away from some large, general-purpose images, but we'd like to reduce the problem earlier in the build process. What approaches are working well for people: hardened commercial images, minimal or distroless images, internally built images, or something else? I'm mainly interested in reducing inherited vulnerabilities before images reach production rather than changing scanner configuration.
5 Answers
Chainguard is a popular commercial option for near-zero-CVE images, and some teams also use hardened images from Red Hat, Docker, or similar vendors. These can save maintenance time, but check the actual scan results, update cadence, licensing, and whether the image catalog supports the libraries and runtimes you need. A vendor image is not automatically vulnerability-free.
For statically linked Go or Rust applications, `FROM scratch` is about as minimal as it gets. For dynamically linked applications, distroless, Wolfi, UBI, hardened Debian-based images, and similar minimal runtimes are worth comparing. The tradeoff is that smaller images can be harder to debug, so teams often use a fuller image during development and a minimal one for production.
Reducing the image is only part of the solution. Many reported vulnerabilities are in libraries that the application never loads or reaches. Use reachability or exploitability context where possible, such as language-specific analysis and VEX data, instead of treating every CVE as equally urgent. Also reduce the runtime attack surface with non-root containers, read-only filesystems, disabled service-account token mounting, restrictive network policies, and only the packages the service actually needs.
Building your own images can work well if you have the pipeline to maintain them. Use multi-stage builds, copy only the required runtime artifacts, pin base images by digest, and rebuild automatically when the base or application dependencies change. Alpine can reduce image size, but it still has CVEs and may introduce compatibility issues, so don’t choose it solely based on scan counts.
There are also curated options such as Iron Bank, Talos for the underlying Kubernetes operating system, and tools that remove unnecessary packages from existing images. The best choice depends on whether you need broad compatibility or the smallest possible runtime. In practice, many teams start with a hardened vendor image, then move selected workloads to distroless or scratch once they understand the application’s runtime requirements.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures