Last active
April 17, 2024 17:33
-
-
Save nilreml/37782a38b2a3b7fedb0df3bd77e2eab8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fast one-liner in current dir: | |
docker run -v $PWD:$PWD -w $PWD --net=[host|none] image cmd | |
Verbose docker info: | |
docker system df -v | |
Delete all build cache: | |
docker builder prune -af | |
Docker cache mounts: | |
Guide: https://docs.docker.com/build/guide/mounts/#add-a-cache-mount | |
Syntax: https://docs.docker.com/reference/dockerfile/#run---mounttypecache | |
Backends: https://docs.docker.com/build/cache/backends | |
Executive summary: | |
The docker driver cache uses the same storage driver as used for image layers. | |
`docker buildx du --verbose` lists build cache, including cache mounts. | |
`docker buildx prune` cleans up dangling cache. | |
`sudo apt install docker-buildx` on Ubuntu since it doesn't get installed by default. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment