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 build: --ignorefile is a NOP #9570

Closed
edsantiago opened this issue Mar 2, 2021 · 4 comments
Closed

podman build: --ignorefile is a NOP #9570

edsantiago opened this issue Mar 2, 2021 · 4 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@edsantiago
Copy link
Member

Basically, the bud --ignore containerignore test from buildah bud.bats

$ tree -A foo-2
foo-2
├── Containerfile
├── ignoreme
├── subdir
│   ├── sub1.txt
│   └── sub2.txt
├── test1.txt
└── test2.txt
$ cat foo-2/Containerfile
FROM quay.io/libpod/alpine:latest
COPY ./ /tmp/
$ cat foo-2/ignoreme
# comment
*
test!
!test2*
subdir
!/sub1*
$ ./bin/podman build -t testignore --ignorefile foo-2/ignoreme foo-2
STEP 1: FROM quay.io/libpod/alpine:latest
STEP 2: COPY ./ /tmp/
STEP 3: COMMIT testignore
--> 57b35c332a7
57b35c332a7a3b96f1507884c6e11509e71ca3d19831785a42c3dd3dcd935125
$ ./bin/podman run --rm testignore ls -la /tmp
total 16
drwxrwxrwt    3 root     root            90 Mar  2 15:53 .
dr-xr-xr-x   19 root     root             0 Mar  2 15:53 ..
-rw-rw-r--    1 root     root            48 Mar  2 15:50 Containerfile
-rw-rw-r--    1 root     root            41 Mar  2 15:51 ignoreme
drwxrwxr-x    2 root     root            32 Mar  2 15:53 subdir
-rw-rw-r--    1 root     root             6 Mar  2 15:52 test1.txt
-rw-rw-r--    1 root     root             6 Mar  2 15:52 test2.txt

If the file is called .dockerignore, it works as expected.

@edsantiago edsantiago added the kind/bug Categorizes issue or PR as related to a bug. label Mar 2, 2021
@rhatdan
Copy link
Member

rhatdan commented Mar 2, 2021

Have you converted this test to a podman system test? I have a PR to fix it, but no test yet, hint hint...

@edsantiago
Copy link
Member Author

I'll write one. Give me an hour please to juggle time for it

@rhatdan
Copy link
Member

rhatdan commented Mar 2, 2021

No problem, I am waiting for the first PR to merge anyways, since this is a follow on.

@rhatdan rhatdan self-assigned this Mar 2, 2021
@edsantiago
Copy link
Member Author

@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

2 participants