-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Is COPY/ADD supposed to work with files in subdirectories? #6847
Comments
@TomSweeneyRedHat PTAL |
A friendly reminder that this issue had no activity for 30 days. |
this is the reulst of the docker:
build it
|
What am I missing? |
Confirmed - since raising this issue, I've upgraded from podman version Is there any means to verify that there are no other edge-cases where |
@nalind is adding a ton of testing for building container images to Buildah, which will hopefully catch these issues. |
2508: Add documentation for .dockerignore r=TomSweeneyRedHat a=rhatdan <!-- Thanks for sending a pull request! Please make sure you've read and understood our contributing guidelines (https://github.com/containers/buildah/blob/master/CONTRIBUTING.md) as well as ensuring that all your commits are signed with `git commit -s`. --> #### What type of PR is this? <!-- Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. Uncomment only one `/kind <>` line, hit enter to put that in a new line, and remove leading whitespace from that line: --> > /kind api-change > /kind bug > /kind cleanup > /kind deprecation > /kind design > /kind documentation > /kind failing-test > /kind feature > /kind flake > /kind other #### What this PR does / why we need it: #### How to verify it #### Which issue(s) this PR fixes: <!-- Automatically closes linked issue when PR is merged. Uncomment the following comment block and include the issue number or None on one line. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`, or `None`. --> <!-- Fixes # or None --> #### Special notes for your reviewer: #### Does this PR introduce a user-facing change? <!-- If no, just write `None` in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information on release notes please follow the kubernetes model: https://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note ``` 2510: Add BuilderIdentityAnnotation to identify buildah version used to bui… r=TomSweeneyRedHat a=rhatdan …ld image We were adding this for buildah commit but not for buildah bud. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> <!-- Thanks for sending a pull request! Please make sure you've read and understood our contributing guidelines (https://github.com/containers/buildah/blob/master/CONTRIBUTING.md) as well as ensuring that all your commits are signed with `git commit -s`. --> #### What type of PR is this? <!-- Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. Uncomment only one `/kind <>` line, hit enter to put that in a new line, and remove leading whitespace from that line: --> > /kind api-change > /kind bug > /kind cleanup > /kind deprecation > /kind design > /kind documentation > /kind failing-test > /kind feature > /kind flake > /kind other #### What this PR does / why we need it: #### How to verify it #### Which issue(s) this PR fixes: <!-- Automatically closes linked issue when PR is merged. Uncomment the following comment block and include the issue number or None on one line. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`, or `None`. --> <!-- Fixes # or None --> #### Special notes for your reviewer: #### Does this PR introduce a user-facing change? <!-- If no, just write `None` in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information on release notes please follow the kubernetes model: https://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note ``` 2517: conformance: add a test for COPY from subdirectory r=rhatdan a=nalind #### What type of PR is this? /kind cleanup #### What this PR does / why we need it: Add a conformance test for containers/podman#6847, making sure that we test copying from a subdirectory of the build context to a new directory. #### How to verify it Compare the combination of build context and Dockerfile content to the reported issue, and if doesn't look like we're doing the same thing here, we'll need to correct the test. #### Which issue(s) this PR fixes: None #### Special notes for your reviewer: The test doesn't need to pass, since we're not requiring that conformance tests pass in CI yet, but this ensures that when we do make it a requirement, we don't miss the case. #### Does this PR introduce a user-facing change? ``` None ``` Co-authored-by: Daniel J Walsh <dwalsh@redhat.com> Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
2510: Add BuilderIdentityAnnotation to identify buildah version used to bui… r=TomSweeneyRedHat a=rhatdan …ld image We were adding this for buildah commit but not for buildah bud. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> <!-- Thanks for sending a pull request! Please make sure you've read and understood our contributing guidelines (https://github.com/containers/buildah/blob/master/CONTRIBUTING.md) as well as ensuring that all your commits are signed with `git commit -s`. --> #### What type of PR is this? <!-- Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. Uncomment only one `/kind <>` line, hit enter to put that in a new line, and remove leading whitespace from that line: --> > /kind api-change > /kind bug > /kind cleanup > /kind deprecation > /kind design > /kind documentation > /kind failing-test > /kind feature > /kind flake > /kind other #### What this PR does / why we need it: #### How to verify it #### Which issue(s) this PR fixes: <!-- Automatically closes linked issue when PR is merged. Uncomment the following comment block and include the issue number or None on one line. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`, or `None`. --> <!-- Fixes # or None --> #### Special notes for your reviewer: #### Does this PR introduce a user-facing change? <!-- If no, just write `None` in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information on release notes please follow the kubernetes model: https://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note ``` 2517: conformance: add a test for COPY from subdirectory r=rhatdan a=nalind #### What type of PR is this? /kind cleanup #### What this PR does / why we need it: Add a conformance test for containers/podman#6847, making sure that we test copying from a subdirectory of the build context to a new directory. #### How to verify it Compare the combination of build context and Dockerfile content to the reported issue, and if doesn't look like we're doing the same thing here, we'll need to correct the test. #### Which issue(s) this PR fixes: None #### Special notes for your reviewer: The test doesn't need to pass, since we're not requiring that conformance tests pass in CI yet, but this ensures that when we do make it a requirement, we don't miss the case. #### Does this PR introduce a user-facing change? ``` None ``` Co-authored-by: Daniel J Walsh <dwalsh@redhat.com> Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I have a Dockerfile containing:
... and I've found that the
COPY
directive succeeds, then theRUN
command fails. Actually, it seems that theCOPY
(andADD
) directives can't handle subdirectories, but regardless succeed even though no file has been copied.I've solved this by changing directory in my build script to effectively move the context folder one level deeper so that I can just do
COPY file /destination
(which works, for otherwise exactly the same setup).But surely, either the
COPY
/ADD
directives should copy the specified file/directory, or they should fail. They should not succeed without creating the intended files within the container (and if locating a source file in a subdirectory is disallowed, then it really should say so!)Output of
podman version
:(... still on 2.0.0_rc6 pending the resolution of #6785)
Output of
podman info --debug
:The text was updated successfully, but these errors were encountered: