Show Menu
Cheatography

Docker Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

docker container run <co­nta­ine­r> <co­mma­nd>

--inte­ractive
--detach
--tty
--rm
-e
Docker keeps a container running as long as the process it started inside the container is running. Docker does not delete resource by default, so the container still exists in the Exited state.
 

docker container ls

--all
List the running contai­ners.

docker container top <co­nta­ine­r_n­ame>

Show the processes running inside the container.

docker exec <co­nta­ine­r_n­ame>

-it
Run a command inside the container.
 

docker container logs <co­nta­ine­r_n­ame>

Show the logs from the container.