Cheatsheets for DevOps: Docker
In this series, I proposes cheatsheets for DevOps . This one is about Docker.
Containers
Running container in the background:
docker run --publish <port-host>:<port-container> --detach <image>
Give a name to the container:
docker run -p <host-port>:<container-port> -d --name <container-name> <image-name>
-p
(--publish
)-d
(--detach
)
List containers:
docker ls -a