MartinW
MartinW

Reputation: 5041

How to filter docker image prune by repository?

I want to prune only docker images from a specific repository and want to use filters to achieve this.

I can do:

docker image ls --filter=reference='git.server.com:5000/my/repo'

and it lists the right images. But when I try:

docker image prune --all --filter=reference='git.server.com:5000/my/repo'

I get:

Error response from daemon: Invalid filter 'reference'

Why is this? And how can I achieve my filter with prune?

Upvotes: 3

Views: 1824

Answers (1)

Enrique Tejeda
Enrique Tejeda

Reputation: 366

The command docker image prune only works with until and label filters, this is mentioned in the docker docs official

Upvotes: 2

Related Questions