Add notes_on_docker_usage.md
This commit is contained in:
parent
b74745df09
commit
65a0519ee7
39
notes_on_docker_usage.md
Normal file
39
notes_on_docker_usage.md
Normal file
@ -0,0 +1,39 @@
|
||||
# Notes on docker
|
||||
|
||||
Docker uses a lot of system resources without your knowledge.
|
||||
This notes describe how to find out and what to do about it.
|
||||
|
||||
## Find out space used by docker:
|
||||
```
|
||||
sudo docker system df
|
||||
```
|
||||
and
|
||||
```
|
||||
sudo du -sh /var/lib/docker/
|
||||
```
|
||||
|
||||
## What to do about it?
|
||||
|
||||
### 1. Remove unused layers (very effective)
|
||||
```
|
||||
sudo docker system prune
|
||||
```
|
||||
### 2. Remove unused images
|
||||
```
|
||||
sudo docker image prune -a
|
||||
```
|
||||
### 3. Clear out unused volume data
|
||||
```
|
||||
sudo docker volume prune
|
||||
```
|
||||
|
||||
### 4. Clear out builder cache
|
||||
```
|
||||
sudo docker builder prune
|
||||
```
|
||||
|
||||
### 5. Remove unused containers:
|
||||
```
|
||||
sudo docker container prune
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user