Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support symlinks inside /kaniko folder #3196

Closed
pe224 opened this issue Jun 10, 2024 · 0 comments
Closed

Support symlinks inside /kaniko folder #3196

pe224 opened this issue Jun 10, 2024 · 0 comments

Comments

@pe224
Copy link

pe224 commented Jun 10, 2024

I recently hit #969 while trying to cache pip (Python package manager) installs over subsequent container builds in Gitlab CI.
In an ideal world, kaniko would support the docker --mount=type=bind/cache/secret commands (various issues open about this), but I understand that this is probably a major development effort.

I successfully work around the missing --mount=type=secret by writing build secrets into files inside /kaniko.
Unfortunately, this does not work for caches, since AFAIU it would involve copying the full cache folder to /kaniko at the start of the build and copying back the updated cache folder to its original location at end.

I wonder:
would it be a smaller effort to enable symlinks from folders (e.g. /cache) in kaniko-project/executor container into /kaniko so that the build process could essentially access and modify them?
If yes, this might also be used to work around the missing --mount=type=bind #1568.
I have no idea how the internals of the /kaniko folder sharing mechanism work, but if it's not copied but only "mounted", maybe it could be a short-term solution?

Edit:
On second thought, it's probably the other way round: supporting the mounting of arbitrary host container folders into the build process as suggested in #1568 would solve this problem as well. Going to upvote the other one and close this one, because I guess "symlinks" to the outside of the build container exactly correspond to a bind-mount functionality.

@pe224 pe224 closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant