Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker Cheat Sheet

Docker Cheat Sheet

All of these assume you're running as root. If not, preface them with sudo as needed.

List of Dangling Images

docker images --filter 'dangling=true' 

To remove them:

docker images -q --filter 'dangling=true' | xargs docker rmi

List of Containers that Exited

docker ps -a -f status=exited

To remove them:

docker ps -a -q -f status=exited | xargs docker rm

Cleaning up the dangling images might be useful - see above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment