Docker prune should not attempt to prune in-use images
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
In general, this doesn't cause problems because if the container is running, the image deletion will fail (and we suppress the log).
However, for scenarios where more aggressive pruning is desired, this complicates matters because you can't do something like keep_recent=0 (i.e. purge purely based on age) -- that will result in weird race conditions at start between Tilt trying to prune what could be the current version of the image, for example.
Even in the current approach, a long-running Tilt session could prune still active images, e.g. see #2644.
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
The issue names no files, tests, or entry points. Start by locating the Docker prune implementation and the logic that selects images, then inspect any related tests. Done means pruning skips images in use without the startup or long-session races described here.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100