2025-03-14 21:59:59 -06:00
|
|
|
# docker container
|
|
|
|
|
|
|
|
|
|
> Manage Docker containers.
|
|
|
|
|
> More information: <https://docs.docker.com/reference/cli/docker/container/>.
|
|
|
|
|
|
|
|
|
|
- List currently running Docker containers:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`docker {{[ps|container ls]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Start one or more stopped containers:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`docker {{[start|container start]}} {{container1_name}} {{container2_name}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Kill one or more running containers:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`docker {{[kill|container kill]}} {{container_name}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Stop one or more running containers:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`docker {{[stop|container stop]}} {{container_name}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Pause all processes within one or more containers:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`docker {{[pause|container pause]}} {{container_name}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display detailed information on one or more containers:
|
|
|
|
|
|
|
|
|
|
`docker container inspect {{container_name}}`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Export a container's filesystem as a `.tar` archive:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`docker {{[export|container export]}} {{container_name}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Create a new image from a container's changes:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`docker {{[commit|container commit]}} {{container_name}}`
|