Skip to content
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

README makes it sound like only COPY and RUN layers can be cached, doesn't seem to be the case #2737

Open
sh-at-cs opened this issue Sep 7, 2023 · 0 comments
Labels
area/caching For all bugs related to cache issues area/cli bugs related to kaniko CLI area/documentation For all bugs related to documentation kind/friction priority/p2 High impact feature/bug. Will get a lot of users happy

Comments

@sh-at-cs
Copy link

sh-at-cs commented Sep 7, 2023

The README currently says

kaniko can cache layers created by RUN (configured by flag --cache-run-layers) and COPY (configured by flag --cache-copy-layers) commands in a remote repository.

That makes it sound like only RUN and COPY layers can be cached, but when I try putting e.g. ENV or ADD statements before the RUN and COPY ones, the cache is consulted for the subsequent layers anyway. Whereas if ENV and ADD truly weren't cached at all, the cache would stop working, because as the README points out elsewhere:

Note that kaniko cannot read layers from the cache after a cache miss: once a layer has not been found in the cache, all subsequent layers are built locally without consulting the cache.

So IMHO there should be more details about how the cache interacts with non-COPY/non-RUN layers.

Related issue (regarding the same sentence, but a different aspect of it): #1940

@aaron-prindle aaron-prindle added area/documentation For all bugs related to documentation priority/p2 High impact feature/bug. Will get a lot of users happy area/caching For all bugs related to cache issues area/cli bugs related to kaniko CLI kind/friction labels Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/caching For all bugs related to cache issues area/cli bugs related to kaniko CLI area/documentation For all bugs related to documentation kind/friction priority/p2 High impact feature/bug. Will get a lot of users happy
Projects
None yet
Development

No branches or pull requests

2 participants