-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Proposal: Kaniko should have option to use local layer cache #923
Comments
related #919 |
cc @tejal29 |
Also related #496 |
Related to #969 |
A common pattern we employ is
In the context of a local cache, could |
I'm very happy to use Kaniko as it solves many security issues, but local caching could make my CI/CD pipelines much faster. In addition, cloud providers will often charge for data transfer, those costs could be reduced with this feature. The CI/CD pattern I use is to have one Multi-Stage Dockerfile with one stage for each step (build, test, publish, etc...), then call Kaniko like that: /kaniko/executor --cache=true --target "${STAGE}" <...> When using Docker it will store intermediate steps locally making things very fast, unfortunately that's not possible with Kaniko. |
@caarlos0 Thanks for the feedback. Like you mentioned we only have a remote cache support. I am happy to help, guide to get this feature delivered |
Even im looking for this feature, it would be great if we have this feature soon! |
Any progress on this issue? |
I am happy for anyone in the community to help implement this feature. Unfortunately at this time, I dont have the time and bandwidth to implement this. |
Given that this has not been addressed so far despite reasonable demand, I wonder what the technical challenges would be to get such capability implemented? |
Is it in the plan? |
@tejal29 I would be willing to take a look at this. The value is obvious. Would it be possible to chat offline to get your perspective on what might be involved? |
Thanks @acanewby. Would you be up for writing up a design proposal just explaining
Thanks |
Any updates? |
I would be very much in favor of this but I'm not sure where to start with making it happen. Did that design proposal get created? |
I very much need this too. I am involved with testing the image locally for vulnerabilities and only then push it to jfrog artifactory.
I can use remote cache with for the time being, is there a way to push the already built |
Came here to try to understand why this has not been done. |
This is also something that is a must for us, sadly leaving us unable to use Kaniko. |
Proposal: Local layer cache
Current behavior
Kaniko currently supports only a remote layer cache (a docker registry).
Kaniko does allow for caching of base images within a local cache, but it does not support image layers built by kaniko (or other docker image build mechanisms)
Desired behavior
Kaniko should allow users to specify a local directory to use for caching layers. Kaniko should support both reading and writing from this cache.
Kaniko should support any local filepath (symlink, hardlink, mounted volume, etc.)
Why this is needed
A non-trivial amount of time during a build using Kaniko is spent reading and writing image layers to the remote cache.
Allowing users to specify a local cache would greatly optimize execution time for builds using caching. This would be useful for users who run Kaniko as part of their local development or in a Kubernetes cluster.
What is out of scope
How would we implement this
Updating kaniko to both read and write the tar and metadata for each layer from a local directory would be a reasonable change to the current executor pkg. Users could specify a local layer cache by passing a flag which would be used as an alternative to --cache-repo. Kaniko would only allow users to specify a local cache OR --cache-repo.
The text was updated successfully, but these errors were encountered: