Support multi-dir wildcards in .dockerignore

Closes #13113

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: eddb14a44eb3ca6ba0b5e6906e21d767eba1af86
Component: engine
This commit is contained in:
Doug Davis
2015-10-14 14:42:21 -07:00
parent 26f967025f
commit 775e6c0f07
4 changed files with 395 additions and 7 deletions

View File

@ -232,6 +232,11 @@ eliminates `.` and `..` elements using Go's
[filepath.Clean](http://golang.org/pkg/path/filepath/#Clean). Lines
that are blank after preprocessing are ignored.
Beyond Go's filepath.Match rules, Docker also supports a special
wildcard string `**` that matches any number of directories (including
zero). For example, `**/*.go` will exclude all files that end with `.go`
that are found in all directories, including the root of the build context.
Lines starting with `!` (exclamation mark) can be used to make exceptions
to exclusions. The following is an example `.dockerignore` file that
uses this mechanism: