diff --git a/atomic_reactor/tasks/binary_container_build.py b/atomic_reactor/tasks/binary_container_build.py index 9a1445b55..282c27f6c 100644 --- a/atomic_reactor/tasks/binary_container_build.py +++ b/atomic_reactor/tasks/binary_container_build.py @@ -257,6 +257,8 @@ def build_container( f"--tag={dest_tag}", "--no-cache", # make sure the build uses a clean environment "--pull-always", # as above + # ensure that Dockerfile is always used even when Containerfile exists + "--file=Dockerfile", ] if memory_limit: # memory limit (format: [], where unit = b, k, m or g) diff --git a/tests/tasks/test_binary_container_build.py b/tests/tasks/test_binary_container_build.py index 4ced4a4cd..11839cfaf 100644 --- a/tests/tasks/test_binary_container_build.py +++ b/tests/tasks/test_binary_container_build.py @@ -473,6 +473,7 @@ def test_build_container(self, authfile, is_flatpak, x86_build_dir, memory_limit f"--tag={X86_UNIQUE_IMAGE}", "--no-cache", "--pull-always", + "--file=Dockerfile", ] if memory_limit: options.append(f"--memory={memory_limit}")