2015-12-27 23:41:20 +05:30
|
|
|
# docker
|
|
|
|
|
|
|
|
> Docker allows you to package an application with all of its
|
|
|
|
> dependencies into a standardized unit for software development.
|
|
|
|
|
|
|
|
- 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-28 23:25:31 -05:00
|
|
|
|
|
|
|
- Start a container from an image and get a shell inside of it
|
|
|
|
|
|
|
|
`docker run -it {{image}} bash`
|
|
|
|
|
|
|
|
- Run a command inside of an already running container
|
|
|
|
|
|
|
|
`docker exec {{container}} {{command}}`
|