Merge pull request #6991 from bobrik/empty-dockerignore
Skipping empty lines in .dockerignore Upstream-commit: 1583e7af416d5c1ff4b99c59f92a953d1ed0ac25 Component: engine
This commit is contained in:
@@ -171,6 +171,10 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
|
||||
return fmt.Errorf("Error reading .dockerignore: '%s'", err)
|
||||
} else if err == nil {
|
||||
for _, pattern := range strings.Split(string(ignore), "\n") {
|
||||
if pattern == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
ok, err := filepath.Match(pattern, "Dockerfile")
|
||||
if err != nil {
|
||||
utils.Errorf("Bad .dockerignore pattern: '%s', error: %s", pattern, err)
|
||||
|
||||
Reference in New Issue
Block a user