Closed kierun closed 3 years ago
@TomSweeneyRedHat PTAL
Fails on main @ b243185e4fbf002c381b4d6cf9be1fe25450f4b9; fails even if file is named .dockerignore
, and even if file content is *
(star).
@nalind PTAL
~It looks like ADD and COPY need to always set the IgnoreUnreadable
flag we introduced in #3060.~
Hmm, does docker build
also produce an error when you point it at your build context? I get error checking context: 'can't stat '/tmp/copier-original-test/volume/data''
when I tried it with your reproducer, with both moby-engine-20.10.7-2.fc35 on Fedora 35 and docker-ce-19.03.12-3.fc30 on Fedora 30. The error message is different, to be sure, but it's looking like the behavior is about right.
Hmm, does docker build also produce an error when you point it at your build context?
docker build
works fine for me. It did not, with the same message as you got, until I added ./volume
to .dockerignore
. When I tried podman, this file should be .containerignore
. In the main repo, I had it simlinked.
/kind bug
Description
A directory owned by
root
and in.containerignore
is still being added to the build.Steps to reproduce the issue:
printf "FROM quay.io/libpod/testimage:20210610\nCOPY ./ ./\n" >Dockerfile
mkdir -p volume/data
cd volume
sudo chown root:root data
sudo chmod 700 data
cd ..
echo "volume/ > .containerignore
podman build -f Dockerfile
Describe the results you received:
Build fails with:
Describe the results you expected:
Build should succeed.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
N.A.