mz444: dynamically determine kanikoDir #454
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #444
Description
So far we assumed that we always start off with executor in
/kaniko/executor. TheKANIKO_DIRenv variable is not used to tell kaniko where it is located, but instead is used to dynamically relocate the kaniko binary after start. When we start off with kaniko in a different directory, we can't even start building. If we were to set theKANIKO_DIR, we would try to copy a non-existing binary over, if we don't set it, all subpaths are now broken. With this change we no longer assume the binary to be in/kaniko/executor, instead we just use the path of the executable being invoked directly. So in the images we provide it will always be/kaniko/executorbut it will work transparently for users that copy the binary somewhere else. All subdirectories are automatically adjusted.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Reviewer Notes
Release Notes
Describe any changes here so maintainer can include it in the release notes, or delete this block.