Closed
Description
label
filter for docker system prune
(and others like docker container prune
) has been added in that commit: moby/moby@7025247
But using it targeting non-recent Docker hosts may be dangerous has this filter is not even considered.
It leads to situations like this one:
$ docker create --label foo=bar redis
5fb69165f8069420f34117c7ec1bc62b55c56cf1f9d9c148188bab1814b3d859
$ docker container prune --filter label=foo=nope
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Deleted Containers:
5fb69165f8069420f34117c7ec1bc62b55c56cf1f9d9c148188bab1814b3d859
The CLI should display return an error when using that filter if remote API version to 1.29.
Metadata
Metadata
Assignees
Labels
No labels