You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if we could pass a CLI flag to add paths to the list, for example /kaniko/executor --ignore-path /first/path --ignore-path /second/path.
Use-case
In our case, we extend the Kaniko image with a few functionalities that our builds require, so we place all the shell scripts and tools in one directory (say /.tools). These scripts manage the build lifecycle and run the kaniko executor binary. We base our Dockerfile on the official Kaniko executor image and, among other things, add a VOLUME /.tools directive so that it's picked up by Kaniko and added to the ignore list.
However we run our builds on Kubernetes, and the problem with this approach is that we can't enforce disk storage limits on /.tools because it's not defined as a volume in the Kubernetes container spec. We also can't do that because it would then mount /.tools as an empty directory not containing the files that are in the actual image.
---
I realize that running the kaniko executor on a different image is neither officially supported nor recommended, but this option would make things a lot easier for us. If this idea is approved we'd be happy to give it a shot and submit a PR :)
The text was updated successfully, but these errors were encountered:
I have another reason for this... The gitlab CI requires that caches be inside the project directory and not in /var/run. Normally I would just specify for golang caches to be in some /var/run/etc, but I can't do that as gitlab won't cache those locations.
Suggestion
This refers to the ignore-list that is used when cleaning up the filesystem between different build steps. Currently the ignore list is initialized with a few default values, and then all filesystem mounts are added to the list.
It would be great if we could pass a CLI flag to add paths to the list, for example
/kaniko/executor --ignore-path /first/path --ignore-path /second/path
.Use-case
In our case, we extend the Kaniko image with a few functionalities that our builds require, so we place all the shell scripts and tools in one directory (say
/.tools
). These scripts manage the build lifecycle and run thekaniko
executor binary. We base ourDockerfile
on the official Kaniko executor image and, among other things, add aVOLUME /.tools
directive so that it's picked up by Kaniko and added to the ignore list.However we run our builds on Kubernetes, and the problem with this approach is that we can't enforce disk storage limits on
/.tools
because it's not defined as a volume in the Kubernetes container spec. We also can't do that because it would then mount/.tools
as an empty directory not containing the files that are in the actual image.---
I realize that running the kaniko executor on a different image is neither officially supported nor recommended, but this option would make things a lot easier for us. If this idea is approved we'd be happy to give it a shot and submit a PR :)
The text was updated successfully, but these errors were encountered: