Basic
docker
docker sub-co­mmands 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 inform­ations on the Daemon
Run
docker run
Run a container from a given image. docker run IMAGE-­NAME
-d
Run in background
-i
Intera­ctive 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-co­mmands 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