Pretty big cache
See original GitHub issueDescription
The cache can grow very quickly with large images, since old entries are not deleted.
Configuration
- Repository URL (if public): https://github.com/MarcelCoding/docker-desktop-vnc/blob/02fb4a97d5a75e40c467b856538efa443d1077cc/.github/workflows/docker-publish.yml#L28-L60
- Build URL (if public): https://github.com/MarcelCoding/docker-desktop-vnc/runs/1549446282?check_suite_focus=true#logs
[...]
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
[...]
- name: Build
uses: docker/build-push-action@v2
with:
push: false
tags: ${{ steps.prepare.outputs.image }}
platforms: ${{ env.DOCKER_PLATFORMS }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
context: .
[...]
Logs
My solution
Add a clean-cache
configuration option that runs the following command before exporting the layers docker system prune -f --filter "until=5h"
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:18
- Comments:29 (10 by maintainers)
Top Results From Across the Web
Efficient cache for gigabytes of data written in Go | Hacker News
BigCache does not handle collisions. When new item is inserted and it's hash collides with previously stored item, new item overwrites ...
Read more >Why does the FF cache become excessively large, and how ...
Firefox will create a large cache if your hard drive or SSD has a lot of space. To constrain it: (1) In a...
Read more >Writing a very fast cache service with millions of entries in Go
The BigCache provides shards, eviction and it omits GC for cache entries. As a result it is very fast cache even for large...
Read more >Caches Are Key to Scaling - Medium
For a very large data set, that could put a pretty big load on your database. Local — Remote Cache. One of the...
Read more >Huge size folder under wp-content\cache\asset-cleanup
For my website wp-content\cache\asset-cleanup\js\ folder after latest updates became to grow quickly. Now its size is 11 GB/22043 inodes! Pretty big even to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MarcelCoding
Yes you’re right atm caches are copied over the existing cache so it keeps growing. Can you open an issue on buildkit repo about that please? In the meantime you can do this:
cc. @tonistiigi
does this mean I can remove my step for local cache setup and just use: