Feature or enhancement request details
When searching for ignore files, container build should follow this order:
- Use the file that has the same pathname as the Dockerfile, with the
.dockerignore suffix, if it exists.
- Use the file named
.dockerignore in the build context directory, if it exists.
The attached archive runs a set of tests to check conformance. The results for colima vs container are shown in the discussion.
Tests:
- Updated 2026-02-25 to include test that ensures
app.Dockerfile.dockerignore gets used for app.Dockerfile instead of Dockerfile.dockerignore in the same directory, and same test when the Dockerfile and ignore files exist outside the context root.
20260205-dockerignore-paths.tgz
Code of Conduct
Feature or enhancement request details
When searching for ignore files,
container buildshould follow this order:.dockerignoresuffix, if it exists..dockerignorein the build context directory, if it exists.The attached archive runs a set of tests to check conformance. The results for colima vs container are shown in the discussion.
Tests:
app.Dockerfile.dockerignoregets used forapp.Dockerfileinstead ofDockerfile.dockerignorein the same directory, and same test when the Dockerfile and ignore files exist outside the context root.20260205-dockerignore-paths.tgz
Code of Conduct