Skip to content

Instantly share code, notes, and snippets.

@shanedroid
Last active December 19, 2016 18:27
Show Gist options
  • Save shanedroid/8c8fa9364746ecedbef205637ff8a2ea to your computer and use it in GitHub Desktop.
Save shanedroid/8c8fa9364746ecedbef205637ff8a2ea to your computer and use it in GitHub Desktop.
Docker Cheat Sheet
Remove all Docker Containers
docker rm $(docker ps -a -q)
Remove all Docker Images
docker rmi $(docker images -a -q)
Remove all Docker Volumes
docker volume rm $(docker volume ls -q)
Inspect all Docker Mounts for a Container
docker inspect -f '{{ json .Mounts }}' "$CONTAINER_ID" | python -m json.tool
Inspect all Docker Container Commands
docker inspect  -f "{{.Name}} {{.Config.Cmd}}" $(docker ps -a -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment