-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache BuildKit state volume #122
Comments
This would be insanely awesome. Would this also cover the situation of not having to set |
This could be huge for speeding up larger or more complicated builds. |
Yes cache exporter would not be required in this case. Note that this solution would only work with GitHub Actions and a defined builder as this is a the local state. |
Imagine of much compute resources would be saved if everyone building docker images on github saved 30sec each time 🤯 |
@Richard87 in this article they saved way more than 30 seconds. |
Thanks @devminded ! I remember I already do thos tings, uts jjust when I update a node dependency or PHP dependencies that everything takes forever 🤔 |
This is very desired feature 😄 For our ruby applications, our Dockerfile look sorta like: FROM alpine-ruby:latest
RUN mkdir /app
COPY Gemfile Gemfile.lock .ruby-version /app
RUN bundle install
COPY . /app ...so any change to our installed dependencies (described on I'm sure this is a very common scenario and, if it was possible to cache the dependencies directory in a docker volume and reuse that docker volume to build new images in between triggered pipelines, I'm sure the impact would be huge! Very much looking forward to this 👍 |
You can already cache dependencies using the |
So using |
No it will not export this cache (cache-to) but it will be cached to the buildkit state (volume). You can try it locally. |
setup-buildx-action is unusable in larger builds because of the lack for buildkit state caching support |
I have this PR out to address this: #211 |
Yes, thats is true. Thanks for clarification. #211 will only work with persistent self-hosted runners. |
follow-up docker/build-push-action#482
Since docker/buildx#672 BuildKit state is saved in a named volume. We should be able to cache it and mount it back. This would require the possiblity to name the builder instead of a generated one.
The text was updated successfully, but these errors were encountered: