-
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
Kaniko doesn't cache in Multistage when copying files from a modified stage #1244
Comments
@tejal29 thank for your responding. I see in line: Line 186 in 03b3391
and line: Line 188 in 03b3391
are the same with 2 different cases. It looks like the key cache of the deps is being generated incorrectly. Is there a way to create a cache key that works the same way as the docker build?
|
We need to remove it from both cases i.e.
Please let me know if you need any more pointers. |
@tejal29 Lines 184 to 189 in 03b3391
and it looks like my problem has been solved. Please check back when you have time. |
Hello We have a very similar situation today when a multistage container created a binary on the first stage but use a cached layer on 2nd stage. |
Not quite the same thing, but related - when using the |
Hi, now that #2065 is merged, it would be great if this could be solved, so it will be safe to re-enable the cache for copy layers in multistage images. For example, we have few images that where affected a lot by not be able to use the copy layer cache, increasing the build time by around 100%. @tejal29 @thaituan any chance to see a fix for this issue? Thank you! |
Actual behavior
In multistage, caching when copying file from a stage (which has change, although that change does not effect on copied file) to other stage does not happen.
It seems that this happened after fixing issue #589
Expected behavior
Layers that haven't changed on the previous stage will still be cached on the next stage.
To Reproduce
Steps to reproduce the behavior:
package.json
(not changedependencies
anddevDependencies
)Example:
"test": "echo \"Error: no test specified\" && exit 10"
->"test": "echo \"Error: no test specified\" && exit 20"
Additional Information
Line 7 is supposed to be cached when only
dependencies
anddevDependencies
are changed.Using the docker command to build works fine, but kaniko not.
--cache
flagThe text was updated successfully, but these errors were encountered: