Caching fails in multi-stage build #682
Labels
area/caching
For all bugs related to cache issues
area/multi-stage builds
issues related to kaniko multi-stage builds
kind/bug
Something isn't working
priority/p2
High impact feature/bug. Will get a lot of users happy
Actual behavior
When I build a multi-stage docker file the cache is blown every time, no matter what I do. The dockerfile (first two stages, where I see the problem, there are more stages):
Each build will use the cache for the first RUN, but always result in looking for a different cache for the second RUN, no matter what I do.
I run with:
Here's a snippet from a run (sorry, messy logs as I cut and paste from jenkins):
I can immediately run the same job after this one pushes the final container and I see:
First RUN found in cache:
Second RUN fails as always:
I don't know why it looks for
dc634b1712d0d0e3737ab1934815008fb2076172725743f710ed08b1712706fb
in the first attempt andbbebc1c2ca0e9048c65f6262ce5649ef10ba391927a9b84170a0ca2f0f574729
in the second. There are no other commands between the two RUNs, except another FROM.Is this because I don't cache the base images?
Expected behavior
I expect it to find a cached layer (the layer it pushes on the previous run) and use it for this rocksdb step.
To Reproduce
Steps to reproduce the behavior:
1.. Hopefully by taking that snippet of dockerfile and running it. I'm running kaniko via Jenkins (so using the latest kaniko:debug container) the command up top.
The text was updated successfully, but these errors were encountered: