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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store