docker / docker/cli

Removing images based on both creation date and repo/tag

Open
#3,962 2 comments 7 reactions 0 assignees View on GitHub

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:

  1. docker image prune does accept the timestamps via --since and --until flags (e.g.: --until=24h), but does not allow filtering by repo/tag.
  2. docker images and docker image ls does accept the repo/tag filters (e.g.: --filter=reference='registry.gitlab.com/group/*/*:*) but does not accept timestamps - only other images ids in --since and --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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.