Closed
Description
A confusing mix of wildcards in .dockerignore
does not work the way it should in podman-remote:
$ 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 .
STEP 1/3: FROM quay.io/libpod/testimage:20210610
STEP 2/3: COPY ./ ./
--> c3555113657
STEP 3/3: COPY subdir ./
COMMIT
--> 5f9f29bd454
5f9f29bd45409e016dfccdea718348e8788c6e0d4de9ed3d35920a3c70c93dc3
It succeeds, but should not. podman
(non-remote) and buildah fail with:
STEP 3/3: COPY subdir ./
Error: error building at STEP "COPY subdir ./": no items matching glob "/home/esm/src/atomic/2018-02.podman/libpod/zzz/subdir" copied (1 filtered out): no such file or directory