Last active
August 29, 2015 14:18
-
-
Save willm/6b6a6af141268a033dc7 to your computer and use it in GitHub Desktop.
docker cheat sheet
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
docker build -t [TAG] . | |
# build an image from a Dockerfile in the current directory with the tagname. | |
docker create --name=[NAME] [TAG] | |
# create a container called [NAME] built from the image [TAG] | |
docker start [NAME] | |
# start the [NAME] container | |
docker ps -a | |
# list all (running and stopped containers) | |
docker rm [NAME] | |
# delete [NAME] container | |
docker exec [NAME] [COMMAND] [ARGS] | |
# run a command inside the container | |
docker inspect [NAME] | |
# print information about the container | |
docker run -t -i [IMAGE] /bin/bash | |
# start and run an interactive shell inside a container from the image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment