Is there a way to cache the image that’s built by Docker via the GitHub Action? It’s installing Linux CLI tools and all my Ruby gems and Node modules on each deploy which takes a while. I’m not sure if there’s a setting to connect to a specific Docker registry/Hub/etc. Thanks!
I’ve looked at Docker caching in GitHub Actions a few times and it’s not obvious how to make it just work.
It seems like it’s possible, though: https://github.community/t/cache-a-docker-image-built-in-workflow/16260
You can actually do separate build + deploy steps with
docker. You might be able to take advantage of some Docker caching actions by separating those steps, this is the simplest version:
docker build . -t myapp flyctl deploy -i myapp
This will push the image layers directly from the machine and skip the
flyctl build step.
If you figure something out, let us know, we do like to share instructions with people for this stuff!
Sorry I didn’t reply back. Thanks for the pointers, I’ll look into it further.