-
Notifications
You must be signed in to change notification settings - Fork 0
Docker Command Line
Gary Moore edited this page May 27, 2018
·
4 revisions
A quick cheatsheet of common Docker commands https://docs.docker.com/engine/reference/commandline/cli/
The docker run command first creates a writeable container layer over the specified image, and then starts it using the specified command.
docker run <image>
docker run -name <name> <image>
https://docs.docker.com/engine/reference/commandline/run/
Pull an image or a repository from a registry
docker pull <image>
https://docs.docker.com/engine/reference/commandline/pull/
docker images
docker images -a //show all
https://docs.docker.com/engine/reference/commandline/images/
Remove one or more images
docker rmi <image>
https://docs.docker.com/engine/reference/commandline/rmi/
List running containers
docker ps
list all including stopped containers
docker ps -a
https://docs.docker.com/engine/reference/commandline/ps/
docker stop <container>
https://docs.docker.com/engine/reference/commandline/stop/
docker rm <container>
Stop and force remove container
docker rm <container> -f