40 lines
622 B
Markdown
Raw Normal View History

2024-12-11 16:35:59 +00:00
# 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
```