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

podman-remote build, with .containerignore, should (but does not) skip .dockerignore #10908

Closed
edsantiago opened this issue Jul 12, 2021 · 0 comments · Fixed by #10913
Closed
Assignees
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote

Comments

@edsantiago
Copy link
Member

podman and buildah, if they see .containerignore, will read it and only it. podman-remote, OTOH, will also look for and read .dockerignore:

mkdir zzz;cd zzz;printf "FROM quay.io/libpod/testimage:20210610\nCOPY ./ ./\n" >Dockerfile
$ echo 'test1*' >.containerignore
$ echo 'test2*' >.dockerignore
$ touch test1 test2
$ ../bin/podman build -q -t foo .;../bin/podman run --rm foo ls
700dae51df0fecf3cf2fbc59343c36f505a5ff87074494180d59dfb258faa9f9
Dockerfile
pause
test2            <---- good. .dockerfile was ignored
testimage-id

$ ../bin/podman-remote build -q -t foo .;../bin/podman run --rm foo ls
707107350bb1bcc1f7b4b29ca857f2b5649a5ab962e4da26cc2696b6100b9b36
Dockerfile
pause                <--- BAD: test2 should be listed here
testimage-id
@edsantiago edsantiago added the remote Problem is in podman-remote label Jul 12, 2021
@rhatdan rhatdan self-assigned this Jul 12, 2021
rhatdan added a commit to rhatdan/podman that referenced this issue Jul 15, 2021
$ mkdir zzz;cd zzz
$ printf "FROM quay.io/libpod/testimage:20210610\nCOPY ./ ./\nCOPY subdir ./\n" >Dockerfile
$ printf "*\nsubdir\n\!*/sub1*\n" >.dockerignore
$ mkdir subdir; touch subdir/sub1.txt
$ ../bin/podman-remote build .

Should fail, but succeeds because we are not sending over the
.dockerignore file to the server side.  This PR will send the
.dockerignore so the server side and use it.

Fixes: containers#10907

Also if both .containerignore and .dockerignore in the context
directory, podman-remote should prefer .containerignore and not use
.dockerignore.

Fixes: containers#10908

Signed-off-by: Daniel J Walsh <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants