Skip to content

Instantly share code, notes, and snippets.

@hiddentao
Created July 7, 2020 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiddentao/646fc067ed893eb550e258efd0a3c02b to your computer and use it in GitHub Desktop.
Save hiddentao/646fc067ed893eb550e258efd0a3c02b to your computer and use it in GitHub Desktop.
Docker CLI cheatsheat (OS X)

Other docker commands

To delete the container:

docker rm --force <container name>

To delete the image:

docker rmi <image name>:latest

To delete all dangling containers and images:

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