File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,49 @@ Kill a running container
3737docker kill container_name/ container_id
3838```
3939
40+ ## Container
41+
42+ List running containers
43+
44+ ```
45+ docker container ls
46+ ```
47+
48+ List all containers even stopped once
49+
50+ ```
51+ docker container ls -a
52+ ```
53+
54+ Start and stop a container
55+
56+ ```
57+ docker start container_name
58+ docker stop container_name
59+ ```
60+
61+ Create a image from a running container
62+
63+ ```
64+ docker container commit container_id image_name
65+ ```
66+
67+ Delete all stopped containers
68+
69+ ```
70+ docker container prune
71+ ```
72+
73+ Get all details related to the container
74+
75+ ```
76+ docker inspect container_id
77+ ```
78+
79+
80+
4081## Prune
82+
4183``` sh
4284docker system prune # prune all docker resources
4385docker system prune -f # prune all resources with force (without prompt)
You can’t perform that action at this time.
0 commit comments