Skip to content

build: match dockerignore names case-sensitively - #3451

Open
locker95 wants to merge 1 commit into
docker:mainfrom
locker95:fix-dockerignore-case
Open

locker95 wants to merge 1 commit into
docker:mainfrom
locker95:fix-dockerignore-case

Conversation

@locker95

@locker95 locker95 commented Oct 8, 2026

Copy link
Copy Markdown

Packing a build context folded dockerignore patterns to lowercase on every OS, so a README.md rule also dropped readme.md on Linux. BuildKit keeps that other file.

fnmatch() now uses os.path.normcase, which is what the docstring already said. Windows still folds case.

Fixes #3450

fnmatch() lowercased both sides on every OS, so a README.md pattern
also dropped readme.md while packing a build context. Use
os.path.normcase, which is what this helper already documented.
Windows still folds case.

Fixes docker#3450

Signed-off-by: Dean Chen <862469039@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.dockerignore matching ignores filename case on Linux

1 participant