Would like to execute docker system prune
but using filters to avoid deleting resources that have either one of 2 different labels.
Assume we would like docker system prune
to exclude all resources with either one of these labels:
io.kubernetes.container.name=name-01
io.kubernetes.container.name=name-02
Running docker system prune -f --volumes --filter "label!=io.kubernetes.container.name=name-01" --filter "label!=io.kubernetes.container.name=name-02"
will result in non of the resources being excluded since it seems that executing the command like this, would exclude resources that have both labels (AND instead of OR).
How could we execute docker system prune
in such way where remove all resources except those matching either one of those labels?