You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nginx a1.11.6 abf312888d13 2 days ago 181.5 MB
nginx 1.11.5 05a60462f8ba 3 weeks ago 181.5 MB
nginx <none> e43d811ce2f4 5 weeks ago 181.5 MB
nginx <none> a5311a310510 7 weeks ago 181.5 MB
I have manually retaged 1.11.6 as a1.11.6 for pattern testing purposes.
I want to remove untagged images, my /etc/docker-gc-exclude file:
nginx:.*[0-9].*
Running docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc -e FORCE_CONTAINER_REMOVAL=1 spotify/docker-gc does not remove any images.
If i change the pattern to nginx:[0-9].* it will remove both untaged images and a1.11.6.
The .*[0-9].* pattern works well with grep. If I create a file named test with contents:
nginx:<none>
nginx:1.11.5
nginx:a1.11.6
and then do cat test | grep .*[0-9].* it will return the expected result:
I am using the latest
spotify/docker-gcimage.My current images:
I have manually retaged
1.11.6asa1.11.6for pattern testing purposes.I want to remove untagged images, my
/etc/docker-gc-excludefile:Running
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc -e FORCE_CONTAINER_REMOVAL=1 spotify/docker-gcdoes not remove any images.If i change the pattern to
nginx:[0-9].*it will remove both untaged images anda1.11.6.The
.*[0-9].*pattern works well with grep. If I create a file namedtestwith contents:and then do
cat test | grep .*[0-9].*it will return the expected result: