Open
Description
Description
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"
.