Infrastructure / DevOps

What are distroless container images?

Distroless images ship only your app and its runtime, with no shell or package manager: how they cut attack surface, multi-stage builds and Chainguard images.

  • 7 min read
  • 5 questions
  • +35 XP
Transcript

Distroless Images, explained by cats. Kitty has a tuna tracking app. She ships it in a Docker image. A Docker image packs kitty's app and its dependencies in one box. Kitty can take that box anywhere. But the box is heavy.

It carries many things. Shells. Package managers. Debug tools. More things also mean more places for bugs to hide. And more attack surface for bad cats to get inside. So Kitty uses a Distroless Image. A distroless image only has the runtime her app needs.

And nothing else. No shell or package manager. But how does kitty get one? She could strip an image down herself. Configure it. Keep it patched. Forever. But that's hard. And Kitty wants a nap. So Kitty uses Chainguard container images.

Chainguard provides Kitty with pre-configured distroless images. Minimal, hardened and rebuilt nightly. Kitty changes one line in her Dockerfile: And now Kitty has a smaller and safer container. Less baggage. Less attack surface. And more protected