tldr/pages/common/docker.md

28 lines
467 B
Markdown
Raw Normal View History

# docker
2016-01-19 22:48:21 +00:00
> Manage Docker containers and images.
- List of running docker containers:
`docker ps`
- List all docker containers (running and stopped):
`docker ps -a`
- Start a container:
`docker start {{container}}`
- Stop a container:
`docker stop {{container}}`
2015-12-29 04:25:31 +00:00
- Start a container from an image and get a shell inside of it:
2015-12-29 04:25:31 +00:00
`docker run -it {{image}} bash`
- Run a command inside of an already running container:
2015-12-29 04:25:31 +00:00
`docker exec {{container}} {{command}}`