Skip to content

Instantly share code, notes, and snippets.

@woblerr
Created November 8, 2019 15:21
Show Gist options
  • Save woblerr/61b88927cb4e4a9fa8d22fd0f1311bac to your computer and use it in GitHub Desktop.
Save woblerr/61b88927cb4e4a9fa8d22fd0f1311bac to your computer and use it in GitHub Desktop.
Useful docker commands

Removing intermediate images left over from multiple builds

docker rmi $(docker images -a --filter=dangling=true -q)

Removing stopped containers

docker rm $(docker ps --filter=status=exited --filter=status=created -q)

Removing all containers and images

docker rm -f $(docker ps -aq)
docker rmi $(docker images -aq)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment