Open payxn opened 1 year ago
Hi @payxn, thanks for flagging this. For a multi-stage build Kaniko works by pulling down each base image and unpacking the image into the root FS and storing files necessary for future builds in preserved root directories. Kaniko then cleans the root dir and copies from these preserved files/dirs as needed in future stages. This issue is likely related to attempting to cleanup the intermediate root fs (from a prev stage of the multi-stage build) but encountering some issue most likely with symlinks (either kaniko's handling of symlinks generally or in this special cleanup case in which a symlink from a cleanup directory maps to a directory that kaniko has marked to not cleanup). This is likely a dupe of #1697
We're running into the same problem. And in our case it fails frequently but inconsistently. We have a number of projects where this kind of multi-stage build works just fine. And one project where it randomly fails. If you simply keep retrying, no changes to the code, scripts or environment, it randomly succeeds like 1 out of 6-7 times.
Actual behavior Kaniko is unable to clean filesystem at the end of the build
To Reproduce I'm running Kaniko latest version through a gitlab runner with the following args
Additionnal information
This was supposed to be a POC to test Kaniko, the build works well with Docker.
Dockerfile :