-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for type=local cache prune #310
Comments
@materemias You can try using |
@prabhav-thali thanks for the suggestion, the problem is that |
I would love to see some way of pruning a local cache destination as well .. is there any workarounds? |
The only workaround I found was to delete files in the local cache directory. I was using the local cache in a github action, and running into problems with the cache growing forever (see also docker/build-push-action#252). I was able to keep the cache pruned by manually deleting layers with # say our cache is in `/tmp/docker_cache`
$ touch /tmp/docker_cache_start # record a timestamp
$ docker buildx build ... \
--cache-from=type=local,src=/tmp/docker_cache \
--cache-to=type=local,dest=/tmp/docker_cache,mode=max
# delete layers that were not accessed during the docker buildx build
$ find /tmp/docker_cache -type f -not -neweram /tmp/docker_cache_start -delete Obviously you could use other |
If you build with
there shall be an easy way to prune unused non tagged images in
docker_cache
.Could you please support this?
The text was updated successfully, but these errors were encountered: