-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker CLI: docker image prune --all --force
is failing in Version 25.0.1
#4852
Comments
is the CLI used to connect with the engine also v25 (as shown in the |
I am executing the command from the production host itself. So, the answer is yes. I have connected to the host machine and ran all these commands there. |
Same problem here. |
I tried reproducing, but wasn't able to. docker image prune --all --force
Deleted Images:
untagged: foo:latest
deleted: sha256:8751eb43d4ff5d968dab6859b657f6986811def9763b058cd14d38844c91f147
deleted: sha256:95cf88e6d656bf67a2d19979611e3c338274dab05b0569ca87fd767397447e20
deleted: sha256:b0b5ee2acc6c3fb75a530512a9dce2b37a3ce92e3bb78fc41d940316f6ca4dce
deleted: sha256:b98766d04d77bda62a67edced5d7b7fcfb5aec94a239674e85dd63a4e48831ad
untagged: alpine:latest
untagged: alpine@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48
deleted: sha256:f8c20f8bbcb684055b4fea470fdd169c86e87786940b3262335b12ec3adef418
untagged: busybox:latest
untagged: busybox@sha256:6d9ac9237a84afe1516540f40a0fafdc86859b2141954b4d643af7066d598b74
deleted: sha256:3f57d9401f8d42f986df300f0c69192fc41da28ccc8d797829467780db3dd741
deleted: sha256:2e112031b4b923a873c8b3d685d48037e4d5ccd967b658743d93a6e56c3064b9
Total reclaimed space: 4.262MB The error indicates that either
For that last option, make sure that the For example; DOCKER_API_VERSION=1.24 docker image prune --all --force
docker image prune requires API version 1.25, but the Docker daemon API version is 1.24 So it's worth checking;
|
I was able to reproduce this bug. It turns out the docker service was not running. Once I ran
It pruned my system without issue. Give that a try? |
@thaJeztah Thanks for the detailed suggestion. Yes, you are right. The home used by the sudo command was different, and the docker used an old version from the root. It worked as expected when I tried with a docker user (with a su to a user from the docker group). |
Closing as a question/usage error. |
For what it's worth, I came here after being a bit lost why my |
That constitutes a bug we fixed; I thought we linked to it from the relevant PR, but clearly not. In any case, yes, the bug is fixed in moby/moby#47440. I closed this issue as the bug component was already tracked at #4890. |
Great! And thank you 💯 |
Description
We have the latest docker installed in our production systems. We were trying to run the image prune command to clean up the images. However, it fails with this error message:
"image prune" requires API version 1.25, but the Docker daemon API version is 1.24
Reproduce
docker image prune --all --force
to prune all the images.Expected behavior
E.g.
docker image prune --all --force
should remove all images which are not associated with any of the running containers.docker version
Client: Docker Engine - Community Version: 25.0.1 API version: 1.44 Go version: go1.21.6 Git commit: 29cf629 Built: Tue Jan 23 23:09:52 2024 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 25.0.1 API version: 1.44 (minimum version 1.24) Go version: go1.21.6 Git commit: 71fa3ab Built: Tue Jan 23 23:09:52 2024 OS/Arch: linux/amd64 Experimental: true containerd: Version: 1.6.27 GitCommit: a1496014c916f9e62104b33d1bb5bd03b0858e59 runc: Version: 1.1.11 GitCommit: v1.1.11-0-g4bccb38 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: