Last active
February 23, 2017 12:43
-
-
Save dvdrhr/921bd0bf897cd9d5a7cdf0f1c063ad87 to your computer and use it in GitHub Desktop.
Docker CLI commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove all exited containers | |
docker rm $(docker ps --all -q -f status=exited) | |
# remove all dangling (not used by any created container) images | |
docker rmi $(docker images -f "dangling=true" -q) | |
# remove all images with name (with or without wildcards) | |
docker rmi -f $(docker images | grep "docker-reg.host.com/imagename.or.partofimagename.*" | awk "{print $3}") | |
# run docker registry garbage collection | |
docker exec -it registry bin/registry garbage-collect /etc/docker/registry/config.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment