This is a draft cheat sheet. It is a work in progress and is not finished yet.
Boot2Docker
Create a new Boot2Docker VM |
boot2docker init |
Start the VM and daemon |
boot2docker start |
Display the environment variables for the Docker client. |
boot2docker shellinit |
Display the boot2docker status |
boot2docker status |
Stop the boot2docker application. |
boot2docker stop |
Upgrade boot2docker |
boot2docker upgrade |
Get the address of the boot2docker VM. |
boot2docker ip |
ssh into boot2docker vm |
boot2docker ssh |
|
|
Docker client
pull a image from Docker Hub |
docker pull <image-name> |
run a image(maybe include pull) |
docker run <image-name> |
list all local images |
docker images |
list all running containers |
docker ps |
list all containers(include existed contrainers) |
docker ps -l |
stop container |
docker stop <container-name> |
remove container |
docker rm <container-name> |
display ports exposed by container |
docker port <container-name> |
container
docker run -t -i |
run container interactively |
docker run -d |
run container daemonized |
docker logs <container> |
fetch the logs of a container |
|