From 48ff2ef5a36df054a6aaf30ee34574ee1ec0b6d7 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 9 Jul 2021 07:50:28 -0400 Subject: Don't exclude Dockerfile, Containerfiles from tar content If the user specifies "*" in a .dockerignore or a .containerignore then podman-remote build should not exclude the Dockerfile or Containerfile or any content pointed to by `-f` in the context directory. We still need these files on the server side to complete the build. Fixes: https://github.com/containers/podman/issues/9867 Signed-off-by: Daniel J Walsh --- test/system/070-build.bats | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'test/system') diff --git a/test/system/070-build.bats b/test/system/070-build.bats index c45a661fe..7046625c6 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -509,6 +509,40 @@ EOF done } +# Regression test for #9867 +# Make sure that if you exclude everything in context dir, that +# the Containerfile/Dockerfile in the context dir are used +@test "podman build with ignore '*'" { + local tmpdir=$PODMAN_TMPDIR/build-test-$(random_string 10) + mkdir -p $tmpdir + + cat >$tmpdir/Containerfile <$tmpdir/.dockerignore <