# Distroless images {#distroless}

Takumi Images are built with Nix and contain only the program being run and the runtime dependencies required for execution and compatibility.
They do not add a general-purpose OS userland or package database.
Images such as `curl` and `nginx` are **distroless**: they have neither `/bin/sh` nor a package manager.
By contrast, `busybox` and `bash` provide shells and command-line tools by design, while images such as `node` and `postgres` include shells or tools for compatibility.
The catalog is therefore not uniformly shell-less. Each image is reduced to what its intended use requires. You can inspect the actual contents in the image configuration and the [SBOM](/docs/t/images/features/attestations/sbom).

## Benefits {#benefits}

The main benefit of a minimal runtime closure is a smaller set of components that can contain vulnerabilities.
You can see the difference by exporting the busybox image. The following command lists all 10 Nix store paths in the current `linux/amd64` image:

```bash
$ crane export --platform linux/amd64 images.flatt.tech/takumi/busybox:latest - \
    | tar -t | grep -oE 'nix/store/[^/]+' | sort -u
nix/store/05bhgqwdwy68k2flj55kcmp54hkbb3jq-nsswitch.conf
nix/store/72v59ca62vgj05ch6iylphh8n5xx3k45-passwd
nix/store/clqknm3pgln8pxb6n7iamffk313nr91r-libidn2-2.3.8
nix/store/czm0rdvgrdf1mf2q1w9pq1j4bc5n8hgk-group
nix/store/dxszpyw0pn7h1cxi1y6l33nmwk7f5knn-libunistring-1.4.2
nix/store/g9i6p3jr42s8bg8ywq4wq6dg4izw4ryn-takumi-busybox-path
nix/store/hps7pxvcgq32x46yx5a2nx53js5j41vb-xgcc-15.2.0-libgcc
nix/store/ias8xacs1h3jy7xgwi2awvim61k2ji6c-glibc-2.42-67
nix/store/kw8wnw8al89qjikhc1sxzdckgw1ms08x-nss-cacert-3.125
nix/store/zbi4rx3wwmgmhjml346hl2xzg8ax2ffq-busybox-1.37.0
```

Six of these paths contain software: busybox, glibc, the GCC runtime (`xgcc-libgcc`), libidn2, libunistring, and the CA certificate bundle (`nss-cacert`). The other four contain configuration files such as `passwd`.
The image's [SBOM](/docs/t/images/features/attestations/sbom) provides the same inventory.

For comparison, the general-purpose `debian:stable` image contains 78 packages as of July 2026:

```bash
$ docker run --rm --pull=always --platform linux/amd64 debian:stable \
    dpkg-query -f '${binary:Package}\n' -W | wc -l
78
```

Those packages include a shell, the `apt` package manager, Perl, and other components that many workloads do not use at runtime.
A scanner must still report their vulnerabilities, leaving users to determine which findings are relevant to their workloads.
Takumi Images reduce that triage surface by including only what each image's intended use requires.

Removing unused components also reduces the **attack surface**.
In a shell-less image, an attacker who can execute code inside the container cannot use a bundled `sh` as an additional foothold.
Images that include shells or tools for their intended purpose do not have that particular property, but still omit unrelated OS components.
This does not prevent a compromise, but it can reduce the components available after one.
