1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-30 02:17:56 +01:00
tldr/pages/common/docker.md

602 B

docker

Manage Docker containers and images.

  • List currently running docker containers:

docker container ls

  • List all docker containers (running and stopped):

docker container ls -a

  • Start a container:

docker container start {{container}}

  • Stop a container:

docker container stop {{container}}

  • Start a container from an image and get a shell inside of it:

docker container run -it {{image}} bash

  • Run a command inside of an already running container:

docker container exec {{container}} {{command}}

  • Remove a stopped container:

docker container rm {{container}}