dind: remove containerd, and use embedded containerd - #585
Conversation
| --exclude 'docker/containerd' \ | ||
| --exclude 'docker/ctr' \ |
There was a problem hiding this comment.
If we do this, we should definitely include a comment here explaining why, probably with a pointer to something useful like moby/moby#53388 -- maybe something like this?
| --exclude 'docker/containerd' \ | |
| --exclude 'docker/ctr' \ | |
| # exclude containerd, relying on the "embedded containerd" instead: https://github.com/moby/moby/pull/53388 (makes for a smaller image) | |
| --exclude 'docker/containerd' \ | |
| --exclude 'docker/ctr' \ |
|
IMO, one of the biggest and most attractive benefits to the containerd integration itself is access to the containerd content store, especially being able to trivially explore/query that via |
|
(it's a very niche use case either way) |
a073bca to
f00b3c6
Compare
|
Still draft, but updated to keep the Size compared to #586 docker image ls dind
IMAGE ID DISK USAGE CONTENT SIZE EXTRA
dind:before 66a85fa1e49a 502MB 131MB
dind:nozfs d2c8980d8cf6 489MB 128MB
dind:noc8d 04d2eaebd3c4 440MB 115MBThe embedded containerd also exposes the containerd socket at docker run -d --rm --name dind --privileged dind:noc8d
docker exec -it dind sh
command -v containerd || echo 'not found'
not found
docker pull -q hello-world
docker.io/library/hello-world:latest
ctr -a /run/docker/containerd/containerd.sock -n moby image ls
REF TYPE DIGEST SIZE PLATFORMS LABELS
docker.io/library/hello-world:latest application/vnd.oci.image.index.v1+json sha256:5dd0d3e6e255913fc30f90b9f2b1d359cc2cbdb48090cc4b65f1676e203243cc 15.5 KiB linux/386,linux/amd64,linux/arm/v5,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x,windows/amd64 - |
|
Pulling directly through containerd .. doesn't work; ctr -a /run/docker/containerd/containerd.sock -n moby image pull docker.io/library/alpine:latest
ctr: unknown service containerd.services.streaming.v1.StreamingBut with a separate containerd probably wasn't fully functional (when trying to use the image in moby); ctr -a /run/docker/containerd/containerd.sock -n moby image pull docker.io/library/alpine:latest
docker.io/library/alpine:latest fetching image content
docker.io/library/alpine:latest fetching image content
└──index (28bd5fe8b56d) complete |++++++++++++++++++++++++++++++++++++++|
...It pulled the image, but docker doesn't have the right data I guess; docker image ls
IMAGE ID DISK USAGE CONTENT SIZE EXTRA
alpine:latest 28bd5fe8b56d 13.5MB 4.2MB
hello-world:latest 5dd0d3e6e255 22.6kB 10.3kB |
f0565c2 to
160c007
Compare
| # exclude containerd, relying on the "embedded containerd" instead: https://github.com/moby/moby/pull/53388 (makes for a smaller image) | ||
| --exclude 'docker/containerd' \ | ||
| ; \ | ||
| rm docker.tgz; \ | ||
| \ | ||
| dockerd --version; \ |
There was a problem hiding this comment.
If we do something like this, we can merge this as-is now with no changes, and it will only apply the change on the next release (even if it's an RC):
| # exclude containerd, relying on the "embedded containerd" instead: https://github.com/moby/moby/pull/53388 (makes for a smaller image) | |
| --exclude 'docker/containerd' \ | |
| ; \ | |
| rm docker.tgz; \ | |
| \ | |
| dockerd --version; \ | |
| {{ if .version == "29.8.2" then "" else ( -}} | |
| # exclude containerd, relying on the "embedded containerd" instead: https://github.com/moby/moby/pull/53388 (makes for a smaller image) | |
| --exclude 'docker/containerd' \ | |
| {{ ) end -}} | |
| ; \ | |
| rm docker.tgz; \ | |
| \ | |
| dockerd --version; \ | |
| {{ if .version == "29.8.2" then ( -}} | |
| containerd --version; \ | |
| {{ ) else "" end -}} |
There was a problem hiding this comment.
Thx! Applied your changes 👍
cc @vvoland FYI
507338d to
bfa7454
Compare
before/after:
docker image ls dind
IMAGE ID DISK USAGE CONTENT SIZE EXTRA
dind:before 6f84404d1f9d 528MB 137MB
dind:latest 5ac80767b941 436MB 112MB
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
bfa7454 to
6465358
Compare
Changes: - docker-library/docker@461d9ad: Update 29-rc to 29.9.0-rc.1, buildx 0.37.2, compose 5.5.1 - docker-library/docker@ec920f4: remove containerd, ctr and use embedded containerd (docker-library/docker#585) Co-authored-by: Docker Library Bot <github+dockerlibrarybot@infosiftr.com>
We could even consider dropping the
zfsdependency; reducing the image size we can go from 528MB -> 429MB (unpacked + content)