This is a draft cheat sheet. It is a work in progress and is not finished yet.
Images
docker images |
Show existing images |
|
|
Container
docker ps |
Show running container |
docker ps -a |
Show all container (including stopped container) |
docker run <image> |
Create and start container from <image> |
docker stop <container> |
Stop the container <container> |
docker rm <image> |
Remove the container <container> |
docker build --tag <image> |
Load build definition from Dockerfile |
Docker Run Options
docker run --port XX:YY <image> |
Create a port mapping |
docker run --rm <image> |
Remove container when stopped |
docker run --volume <image> |
Mount a volume into container |
docker run --tag NAME <image> |
Create a container called NAME |
|