Image builds caching with AWS ECR

Thanks for the respones! It’s good to hear that caching could be enabled soon.

Quick question: do you have some numbers to share with us? How long does your build take today? How long will it take with the cache? (I could take a look myself, of course).

I think you’ll gain more insights if you look it up. E.g. the layer that does apk add --update --upgrade takes ~20-30 seconds to build; layer that does installation of our app dependencies takes ~90 seconds. Sprinkle in some intermediate layers and one of our images takes exactly 5 minutes to build. Take into account that this has to happen twice in sequence (omitting the fact that apps have to build the image individually, since it doesn’t have a big impact on deployment time due to parallelisation) since we have lifecycle jobs that run first, and we get at least 10 minutes spent on image builds alone during deployment.

We have proceeded with the solution outlined in the adjacent discussion by building our own CI pipeline that builds images (with ECR’s cache-to and cache-from flags) and deploys them to qovery using qovery X update and qovery environment deploy - the whole CI workflow with a deployment takes 3 minutes (including build time and waiting for pods to be in the running state) on average now since most of the Docker layers get fetched from the cache.