Skip to content

dind: remove obsolete runtime dependencies - #584

Merged
tianon merged 4 commits into
docker-library:masterfrom
thaJeztah:remove_dependencies
Sep 4, 2026
Merged

dind: remove obsolete runtime dependencies#584
tianon merged 4 commits into
docker-library:masterfrom
thaJeztah:remove_dependencies

Conversation

@thaJeztah

Copy link
Copy Markdown
Contributor

dind: remove obsolete runtime dependencies

dind: remove btrfs-progs dependency

The btrfs storage driver no longer requires the btrfs userspace
utilities at runtime.

Moby switched its btrfs implementation to use the kernel UAPI directly
in v23.0, removing its dependency on libbtrfs/btrfs-progs.

Containerd similarly switched its btrfs snapshotter to use the kernel
UAPI through containerd/btrfs/v2 in containerd 1.7, making kernel
headers a build-time dependency instead of requiring btrfs-progs at
runtime.

Remove btrfs-progs from the dind image, as neither the Moby btrfs
storage driver nor containerd's btrfs snapshotter requires it.

dind: remove e2fsprogs and xfsprogs dependencies

The e2fsprogs, e2fsprogs-extra, and xfsprogs packages were runtime
dependencies of the devicemapper storage driver, providing the tools
used to create and configure ext4 and XFS filesystems.

The devicemapper storage driver was disabled by default in Docker
Engine v23.0 and removed in v25.0. None of these filesystem utilities
are required by the remaining storage drivers.

Remove e2fsprogs, e2fsprogs-extra, and xfsprogs from the dind image.

dind: remove duplicate git dependency

Git was originally added explicitly to the dind variants when the
separate git variant was folded into dind.

It was later added to the CLI variants as well, to support build and
buildx workflows that invoke git. As the dind image is based on the CLI
image, git is now inherited from its parent and no longer needs to be
installed again.

Remove the redundant git package from the dind dependencies.

dind: update links for runtime-dependencies

The btrfs storage driver no longer requires the btrfs userspace
utilities at runtime.

Moby switched its btrfs implementation to use the kernel UAPI directly
in v23.0, removing its dependency on libbtrfs/btrfs-progs.

Containerd similarly switched its btrfs snapshotter to use the kernel
UAPI through containerd/btrfs/v2 in containerd 1.7, making kernel
headers a build-time dependency instead of requiring btrfs-progs at
runtime.

Remove btrfs-progs from the dind image, as neither the Moby btrfs
storage driver nor containerd's btrfs snapshotter requires it.

- moby/moby@3208dca
- containerd/containerd@52f82ac

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The e2fsprogs, e2fsprogs-extra, and xfsprogs packages were runtime
dependencies of the devicemapper storage driver, providing the tools
used to create and configure ext4 and XFS filesystems.

The devicemapper storage driver was disabled by default in Docker
Engine v23.0 and removed in v25.0. None of these filesystem utilities
are required by the remaining storage drivers.

Remove e2fsprogs, e2fsprogs-extra, and xfsprogs from the dind image.

- https://docs.docker.com/engine/deprecated/#device-mapper-storage-driver

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Git was originally added explicitly to the dind variants when the
separate git variant was folded into dind.

It was later added to the CLI variants as well, to support build and
buildx workflows that invoke git. As the dind image is based on the CLI
image, git is now inherited from its parent and no longer needs to be
installed again.

Remove the redundant git package from the dind dependencies.

- docker-library@485fefe
- docker-library@b348a31

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

Copy link
Copy Markdown
Contributor Author

@thaJeztah

Copy link
Copy Markdown
Contributor Author

Goes from 528MB -> 519MB (unpacked + content)

docker image ls dind
IMAGE           ID             DISK USAGE   CONTENT SIZE   EXTRA
dind:before     6f84404d1f9d        528MB          137MB
dind:lessdeps   7c41dc0bc569        519MB          134MB

cc @tianon @yosifkit @vvoland

Comment thread Dockerfile-dind.template
btrfs-progs \
e2fsprogs \
e2fsprogs-extra \
git \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't Buildkit also depend on git for the git sources?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does, but the DIND image is based on the CLI image, which has it already installed

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I should have read the commit body!

@thaJeztah

Copy link
Copy Markdown
Contributor Author

Also opened this one as draft (probably needs some looking what we want to keep);

Comment thread Dockerfile-dind.template
shadow-uidmap \
xfsprogs \
xz \
zfs \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is ZFS really still actually supported?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see you mention that over in #585, but IMO it has a similar shape/flavor to this PR to remove ZFS here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was considering removing it; for this PR I limited to dependencies that were not needed, so no behavior change. But honestly not sure if anyone would be using ZFS with this image.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you prefer removing it already, or in a follow up.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess a follow-up would be good so we can let it simmer for a minute and see if anyone sees it and complains (although that will usually only happen after it's merged and released, but at least then there'll be a dedicated place to discuss / explain).

@tianon

tianon commented Sep 4, 2026

Copy link
Copy Markdown
Member

#504 (comment) lol, "later" has come 😄

For now, I've just added git to the CLI variants without removing it from the DinD variants because the later apk add should be a no-op, but I'm open to removing it and relying on the FROM relationship

@tianon
tianon merged commit 925e9ee into docker-library:master Sep 4, 2026
5 checks passed
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Sep 4, 2026
Changes:

- docker-library/docker@925e9ee: Merge pull request docker-library/docker#584 from thaJeztah/remove_dependencies
tianon added a commit to docker-library/official-images that referenced this pull request Sep 4, 2026
Changes:

- docker-library/docker@925e9ee: Merge pull request docker-library/docker#584 from thaJeztah/remove_dependencies

Co-authored-by: Docker Library Bot <github+dockerlibrarybot@infosiftr.com>
@thaJeztah
thaJeztah deleted the remove_dependencies branch September 4, 2026 22:08
@thaJeztah

Copy link
Copy Markdown
Contributor Author

#504 (comment) lol, "later" has come 😄

For now, I've just added git to the CLI variants without removing it from the DinD variants because the later apk add should be a no-op, but I'm open to removing it and relying on the FROM relationship

Ha! Missed that comment; I looked at the git history and found both commits (and did consider it was likely a no-op). 😅

I'll have a look at the follow up(s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants