-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Skip the /kaniko directory when copying root #2863
Skip the /kaniko directory when copying root #2863
Conversation
This commit adds the skip option for otiai10.Copy to skip the /kaniko directory when the root is being copied. The files under /kaniko dir should be ignored and thus this shall not cause any loss of information. fixes: GoogleContainerTools#2033
9a96d4b
to
6b0531f
Compare
FROM busybox:1.31 | ||
COPY context/foo foo | ||
|
||
FROM alpine@sha256:5ce5f501c457015c4b91f91a15ac69157d9b06f1a75cf9107bf2b62e0843983a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have full context, but could you help explain how does this dockerfile tests the logic change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is the release note related to the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have full context, but could you help explain how does this dockerfile tests the logic change?
Prior to this change, when the source "/" is specified, we will see errors described at #2033 (comment) with recursive /kaniko/0
in the names. This test case test copying from root and the kaniko/0
folder shall not be apparent.
I also added a sentence for the previous situation in the message. Thanks for pointing this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just testing this locally and it works great, thanks for fixing this!
Prior to this change, the files under the
/kaniko
dir is also attempted to be copied. This commit adds the skip option for otiai10.Copy to skip the /kaniko directory when the root is being copied. The files under /kaniko dir should be ignored and thus this shall not cause any loss of information.fixes: #2033
Description
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