Created
September 18, 2018 07:28
-
-
Save jackofallops/b1405b07b3d0b120aa35d40614d14b68 to your computer and use it in GitHub Desktop.
Docker cli cheatsheet (basic)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show running containers | |
docker ps | |
# show running and stopped containers | |
docker ps -a | |
# show container logs, -f option follows logs like "tail" | |
docker logs [-f] [container ID or name] | |
# stop a container | |
docker stop [container ID or name] | |
# start a stopped container | |
docker start [container ID or name] | |
# remove a stopped container | |
docker rm [container ID or name] | |
# List local images | |
docker images | |
# remove a local image | |
docker rmi [image ID or name:label] | |
# clean up temp docker files, images, layers, cache etc | |
docker system prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment