Hey @BrightRan I'm hoping to avoid self-hosted runners unless absolutely necessary. The issue I experience is that if I build the image without caching, it works, but takes 25 minutes. If I build with caching, it takes 5 minutes. If I build with a change early in the process, I've downloaded the caches and it runs out of disk space because the cache + the new layers is too much. Here's what I'm hoping to achieve: Build the image with a cache (should take 5 mins) If 1 fails because it runs out of disk, clear the cache and free up the disk from step 1 Because it's failed, build the image without using a cache (will take 25 mins) What I'm having trouble with is that step 3 fails because there is left over Docker layers (or something) from step one. If I do just build without a cache it works fine, but it will always take 25 mins. I want both cache and handling the cache being too big!
... View more
I have a large Docker image that sometimes has issues building, because it's so big. I'm using [Docker Build with Cache Action](https://github.com/whoan/docker-build-with-cache-action) for build caches, but sometimes this will fail because the cache plus the new layers is more than 14 GB. I'm trying to catch this error and run a second time with no cache, but it seems some of the Docker things (images, layers, whatever) are still lingering. So I run a step `docker system prune --force` and it removed around 700 MB of files. This wasn't enough, so I ran a more aggressive command, ` docker system prune --force --all --volumes`. This appears to have removed some of the GitHub Actions required components, as the next step fails to run, with the error: ``` Unable to find image 'e87b52:0c9a57e74a414c4bbe60bd043fcbf313' locally /usr/bin/docker: Error response from daemon: pull access denied for e87b52, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. ``` So I'm wondering if there's a better way to clear out the previous step's Docker leftovers, by using a filter on the `docker system prune` command, perhaps. Not sure if the key GitHub Actions required Docker images have a label set perhaps?
... View more