Skip to content

Instantly share code, notes, and snippets.

@debuti
Last active June 11, 2018 14:05
Show Gist options
  • Save debuti/409a0f73e2705eefb99a161a1e25247a to your computer and use it in GitHub Desktop.
Save debuti/409a0f73e2705eefb99a161a1e25247a to your computer and use it in GitHub Desktop.
Docker cmds cheatsheet
# State flow diagram
https://i.stack.imgur.com/vGuay.png
# Delete containers
docker rm $(docker ps -a -q)
# List containers
docker container ls -a
# Delete images
docker rmi -f $(docker images -q) # Run several times to delete dependency images
# List images
docker images -a
docker ps -a
# Build an image from a Dockerfile in the cwd
docker build -ta .
# Execute a container interactively, mounting a folder
docker run -itv $HOME/tmp:/tmp a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment