Basic | |
docker
|
docker sub-commands to have an overview of the Docker daemon.
|
ps
|
List running containers
|
ps -a
|
List all containers
|
images
|
List all images
|
version
|
Display version
|
info
|
Various informations on the Daemon
|
Run | |
docker run
|
Run a container from a given image.
docker run IMAGE-NAME |
-d
|
Run in background
|
-i
|
Interactive session
|
-t
|
TTY
|
-p H:C
|
Exposes the port
C of the container to the port H of the host |
-v H:C
|
Mount the host path
H at the path C in the container |
–rm
|
Remove the container when exited
|
–name
|
Give a name to the container
|
Manage | |
docker
|
Sub-commands followed by the container ID or name.
|
logs
|
Get the logs of the container
|
–follow
|
Follow the logs
|
rm
|
Remove the container
|
-f
|
Force removal of the container
|
kill
|
Kill the container
|
inspect
|
Inspect the details of a container
|