Add info about build cache to docker cheat sheet

This commit is contained in:
Aroy-Art 2024-12-27 12:34:56 +01:00
parent 5c9fd4a0d0
commit d8071c0975
Signed by: Aroy
GPG key ID: 583642324A1D2070

View file

@ -43,11 +43,18 @@ And to purge the docker system ([Docker Docs](https://docs.docker.com/engine/ref
docker system prune docker system prune
``` ```
{{< alert theme="info">}}
For some users the `docker system prune` command dosen't delete the build cache so if thats the case that a look at the [Build system leftovers](#build-system-leftovers) section
{{< /alert>}}
### The old way (Docker < 1.13) ### The old way (Docker < 1.13)
#### Delete Volumes #### Delete Volumes
{{< alert theme="info" >}} // see: https://github.com/chadoe/docker-cleanup-volumes {{< /alert >}} {{< alert theme="info" >}}
For more info and a complete shell script see:
https://github.com/chadoe/docker-cleanup-volumes
{{< /alert >}}
```Shell ```Shell
docker volume rm $(docker volume ls -qf dangling=true) docker volume rm $(docker volume ls -qf dangling=true)
@ -79,6 +86,20 @@ or
docker network ls | awk '$3 == "bridge" && $2 != "bridge" { print $1 }' docker network ls | awk '$3 == "bridge" && $2 != "bridge" { print $1 }'
``` ```
## Build system leftovers
If your system is also used for building images you might have a look at cleaning up garbage created by the builders using:
```Shell
docker buildx prune --all
```
and
```Shell
docker builder prune --all
```
## Conclusion ## Conclusion
First of thanks for reading this. First of thanks for reading this.