docker / docker/build-push-action
Pretty big cache
Open
Nobody has claimed this yet.
area/buildkit
area/cache
kind/upstream
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 735
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 14
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".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cache and Build steps in .github/workflows/docker-publish.yml, then review the linked logs and the issue discussion for the action's current cache behavior. Done means the action exposes the proposed clean-cache configuration and runs the cleanup before exporting layers without allowing the cache to grow indefinitely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github-actions, typescript
- Domain
- build-system, ci-cd
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100