Skip to content

Commit 487ef03

Browse files
committed
Clarify the behavior of wildcards in .dockerignore file
Unlike .gitignore, `*.md` in .dockerignore doesn't match `subdir/foo.md`. While the logic is in github.com/moby/patternmatcher, it is worth to note the difference in the reference document. Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent 31a9120 commit 487ef03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/dockerfile/docs/reference.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,9 @@ uses this mechanism:
392392
!README.md
393393
```
394394

395-
All markdown files *except* `README.md` are excluded from the context.
395+
All markdown files right under the context directory *except* `README.md`
396+
are excluded from the context. Note that markdown files under subdirectories
397+
are still included.
396398

397399
The placement of `!` exception rules influences the behavior: the last
398400
line of the `.dockerignore` that matches a particular file determines

0 commit comments

Comments
 (0)