.png)
Container images built on traditional Linux distributions like Red Hat UBI, Debian, Ubuntu, and Fedora have long been the standard for application deployment. However, these images come with significant security and operational overhead.
In this blog, we take a closer look at why distroless images offer a more secure foundation and what teams can do to migrate without disrupting their workflows.
Traditional distribution-based images include many components that are unnecessary for production runtime environments, such as package managers, shells, and numerous utilities that expand the attack surface and increase image size.
These components are often configured without secure defaults in order to allow the team developing on top of them the most flexibility for the applications that will run inside the container.
This leads to several disadvantages:
Distroless images are container images that remove the full Linux distribution and include only the application and its required runtime libraries, nothing more.
By removing everything except the runtime requirements and direct dependencies, distroless images dramatically reduce the attack surface. Without shells, package managers, or development utilities, these images provide a minimal, hardened foundation for production workloads. Key security advantages include:
Security best practices are clear: every additional component is another potential vulnerability. Distroless images remove that unnecessary exposure, making them superior for container security.
Even though distroless images offer clear security and operational benefits, migrating to them can be difficult. The primary challenge when adopting distroless images is the build process itself.
Traditional Dockerfiles rely on distribution package managers like `apt-get`, `yum`, or `dnf` to install dependencies during image construction. A pure distroless image cannot accommodate these commands, creating a migration barrier for teams accustomed to traditional workflows, often forcing teams to rethink pipelines or maintain two separate images for the same application.
Minimus solves this challenge through its complementary image pair strategy. Every Minimus image version comes in two variants: a production image and a dev image.
The production image is lean and distroless, containing only runtime essentials. The dev variant includes development tools, a shell, and a package manager: everything needed to build and test applications using familiar workflows.
This pairing gives the flexibility of traditional images during development while delivering the security and efficiency of distroless images in production.
You can migrate to Minimus images in two phases. The first is a simple drop-in change: swap your build stage for the Minimus -dev image and your final stage for the production image. This delivers immediate wins, letting you ship distroless images without rewriting pipelines or changing development habits.
The second phase involves using the Minimus Image Creator to build fully customized, pre-configured distroless images tailored to your exact needs.
Start your migration by leveraging Minimus dev images in multi-stage Dockerfiles. Use the `-dev` variant (e.g., `dotnet-sdk:latest-dev`) for build stages where you need package managers and development tools. Then copy your artifacts into the production Minimus image for the final runtime stage.
This approach allows you to maintain your existing build processes while immediately benefiting from distroless production images. You can continue using `apk`, `curl`, and other familiar commands in your build stages, while your final image remains minimal and secure.
Next, you can use the Minimus Image Creator to create private, customized images by selecting a Minimus starter image and adding only the specific packages your application requires. Instead of installing packages at build time, you pre-configure your image with exactly what you need. This simplifies Dockerfiles, reduces build complexity, and further optimizes your container security posture.
The Image Creator supports up to 100 added packages and allows you to define custom environment variables, creating images tailored to your exact requirements. It builds your custom image, maintains it over time, and provides a complete SBOM for security and compliance.
Migrating to distroless images doesn't require abandoning your current workflows. Minimus dev variants provide a bridge that lets you build the way you do today while deploying more secure production images. As you mature your container strategy, the Minimus Image Creator offers a path to fully optimized, custom distroless images that combine security, simplicity, and maintainability.