Skip to content

Instantly share code, notes, and snippets.

@ivangabriele
Last active February 1, 2022 07:50
Show Gist options
  • Save ivangabriele/b95e8ea73aa45603871dcadfaa105953 to your computer and use it in GitHub Desktop.
Save ivangabriele/b95e8ea73aa45603871dcadfaa105953 to your computer and use it in GitHub Desktop.
Commonly used Docker commands cheat sheet.

List all containers (only IDs)

docker ps -aq

Stop all running containers

docker stop $(docker ps -aq)

Remove all containers

docker rm $(docker ps -aq)

List all images

docker image ls

Remove all unused images

docker image prune -af

Remove all images

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