Multi stage build cache not cleaned when building multiple images #1829
Labels
area/multi-stage builds
issues related to kaniko multi-stage builds
feat/cleanup
kind/bug
Something isn't working
kind/feature-request
ok-to-close?
possible-dupe
priority/p1
Basic need feature compatibility with docker build. we should be working on this next.
Using kaniko 1.7.0 and previous versions, a multi stage Dockerfile and multiple image builds with the
--context
and--dockerfile
flags and Gitlab CI, the first built image will have data in/kaniko/0
that is not deleted with the use of the--cleanup
flag. This results in files from the first image being added to the second image.Expected behavior
The
--cleanup
flag should delete the contents of/kaniko/0
after a successful kaniko runTo Reproduce
Forking the Example repos that @AndreKR documented in reporting symlink cleanup issue #1217
This branch uses the cleanup flag and job log shows second image contains a file from the first image
Testing with kaniko version 1.3.0 did not fix the issue
Testing with single snapshot flag did not fix the issue
Manually removing the cache between image builds was the only solution that worked
Related Issues
#1217 #1406
--cache
flagThe text was updated successfully, but these errors were encountered: