Removing images based on both creation date and repo/tag
Open
Nobody has claimed this yet.
kind/feature
status/0-triage
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
At the moment:
docker image prunedoes accept the timestamps via --since and --until flags (e.g.: --until=24h), but does not allow filtering by repo/tag.docker imagesanddocker image lsdoes accept the repo/tag filters (e.g.:--filter=reference='registry.gitlab.com/group/*/*:*) but does not accept timestamps - only other images ids in--sinceand--before(e.g.--since=586026f10754)
I'd like to be able to do both:
docker image prune -a --filter=reference='registry.gitlab.com/group/*/*:*'
docker image ls --until=24h
For more context and a use-case, see here.
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 by tracing the Docker CLI commands behind docker image prune and docker image ls, then inspect how their existing date and repo/tag filters are parsed and applied. Verify combined date and reference filtering with the relevant command tests; done means both example workflows filter images by the requested repository/tag and timestamp.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100