Skip to content

Commit b938ce9

Browse files
committed
Update README.md (Docker cheat sheet)
1 parent 6c94f2e commit b938ce9

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

Cheat_sheets/Docker/README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,68 @@
22

33
## Index
44

5-
1. [Docker Hub & GitHub Packages](#docker-hub--github-packages)
5+
1. [Commands](#commands)
6+
1. [View Containers](#view-containers)
7+
2. [View Images](#view-images)
8+
3. [View Volumes](#view-volumes)
9+
4. [Check Disk Usage](#check-disk-usage)
10+
5. [Clean Up](#clean-up)
11+
2. [Docker Hub & GitHub Packages](#docker-hub--github-packages)
612
1. [Login](#login)
713
2. [Build](#build)
814
3. [Tag](#tag)
915
4. [Push](#push)
1016
5. [Pull](#pull)
1117
10. [Additional information](#additional-information)
1218

19+
## Commands
20+
21+
#### View Containers
22+
23+
```shell
24+
# Running containers
25+
docker ps
26+
```
27+
28+
```shell
29+
# All containers (including stopped)
30+
docker ps -a
31+
```
32+
33+
#### View Images
34+
35+
```shell
36+
docker images
37+
```
38+
39+
```shell
40+
docker image ls
41+
```
42+
43+
#### View Volumes
44+
45+
```shell
46+
docker volume ls
47+
```
48+
49+
#### Check Disk Usage
50+
51+
```shell
52+
docker system df
53+
```
54+
55+
#### Clean Up
56+
57+
```shell
58+
# Remove build cache
59+
docker builder prune
60+
```
61+
62+
```shell
63+
# Full cleanup (images, stopped containers, volumes, cache)
64+
docker system prune -a --volumes
65+
```
66+
1367
## Docker Hub & GitHub Packages
1468

1569
#### Login

0 commit comments

Comments
 (0)