trow icon indicating copy to clipboard operation
trow copied to clipboard

Improve Caching in Docker builds

Open amouat opened this issue 5 years ago • 3 comments

I've played around with this a bit, but our Docker builds are still pretty slow, especially in GitHub actions.

BuildKit has some nice features that we might be able to use to improve things. Could we have a cache of rust packages pulled in from another image use --cache-from?

amouat avatar Aug 26 '20 11:08 amouat

There's an example here: https://docs.github.com/en/free-pro-team@latest/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images#updating-your-github-actions-workflow

Also, manifest-tool should be updated.

amouat avatar Nov 08 '20 11:11 amouat

I'm willing to help out here! I think I could help speed it up, by introducing an Earthfile, which can help reproducibility and uses the baked-in Buildkit caching. We see pretty decent speed improvements on our own builds from the Buildkit cache.

Of course, as long as you and your project are open to the idea of course.

dchw avatar Mar 25 '21 16:03 dchw

Interesting! I've not seen this before. I'm open to this idea, but I'm also reluctant to introduce more tech - it's really easy to just get started with a Dockerfile.

amouat avatar Mar 26 '21 12:03 amouat