kaniko
kaniko copied to clipboard
Volume directories do not get cleaned in the end of execution with --cleanup flag
Actual behavior
When using the --cleanup flag it was expected that the full filesystem gets back to its initial state. But because it uses the ignored list updated during the build it will not delete the directories marked as volumes from the filesystem. This leads to errors when processing multiple images sequentially within the same kaniko image.
Expected behavior The filesystem of the kaniko image should delete everything that was created during the image build at the end of execution.
To Reproduce Steps to reproduce the behavior:
- Create 2 dockerfiles, a first one that instantiates a volume and a second one that tries to create a directory in the same path of the volume.
- Run kaniko sequentially on those two dockerfiles.
Additional Information
- Dockerfile 1
- Dockerfile 2
- Build Context
Attatched zip with dockerfiles and scripts to allow for easy reproducibility.
Just run
launch.sh - Kaniko Image (fully qualified with digest) gcr.io/kaniko-project/executor:v1.8.1-debug (e1e8f684a8d2)
Triage Notes for the Maintainers
| Description | Yes/No |
|---|---|
| Please check if this a new feature you are proposing |
|
| Please check if the build works in docker but not in kaniko |
|
Please check if this error is seen when you use --cache flag |
|
| Please check if your dockerfile is a multistage dockerfile |
|