Pruning a stopped builder doesn't start the container automatically
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug and checked that ...
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
If you have a stopped builder, e.g. docker-container, and try to prune the builder, yo get an error.
$ docker buildx ls
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
container * docker-container
container0 desktop-linux stopped
default docker
default default running v0.12.2+6560bb937e8c linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64
desktop-linux docker
desktop-linux desktop-linux running v0.12.2+6560bb937e8c linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64
$ docker buildx --builder container prune
WARNING! This will remove all dangling build cache. Are you sure you want to continue? [y/N] y
ERROR: Error response from daemon: container 4ef043ec0c738f11ca964be2bee93ded660af69e1eaea69c5655c9d25cc36941 is not running
Expected behaviour
I expect to be able to prune the builder without starting it with e.g. docker buildx inspect --bootstrap first
Actual behaviour
It doesn't prune
Buildx version
github.com/docker/buildx v0.11.2-desktop.5 f20ec1393426619870066baba9618cf999063886
Docker info
No response
Builders list
See above
Configuration
n/a
Build logs
No response
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the docker buildx --builder container prune command sequence and the stopped docker-container builder behavior shown in the report. Reproduce the failure, trace the prune path and its daemon response, and verify that pruning succeeds without first running docker buildx inspect --bootstrap.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100