July 2017
Beginner to intermediate
358 pages
10h 54m
English
The .dockerignore file is similar to a git ignore file before the CLI sends the context to the Engine, it excludes files and directories that match patterns in the .dockerignore file. It uses the patterns which are defined in Go's filepath.Match rules you can find more information about them in the following Go documentation: https://godoc.org/path/filepath#Match
|
Rule |
Behavior |
|
# comment |
Ignored. |
|
*/temp* |
Exclude files and directories whose names start with temp in any immediate subdirectory of the root. For example, the plain file /somedir/temporary.txt is excluded, as is the directory /somedir/temp. |
|
*/*/temp* |
Exclude files and directories starting with temp from any subdirectory that is two levels ... |
Read now
Unlock full access