Skipping empty lines in .dockerignore
Docker-DCO-1.1-Signed-off-by: Ian Babrou <ibobrik@gmail.com> (github: bobrik)
This commit is contained in:
parent
2d34a08c48
commit
1a1ee73e38
1 changed files with 4 additions and 0 deletions
|
@ -171,6 +171,10 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
|
||||||
return fmt.Errorf("Error reading .dockerignore: '%s'", err)
|
return fmt.Errorf("Error reading .dockerignore: '%s'", err)
|
||||||
} else if err == nil {
|
} else if err == nil {
|
||||||
for _, pattern := range strings.Split(string(ignore), "\n") {
|
for _, pattern := range strings.Split(string(ignore), "\n") {
|
||||||
|
if pattern == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
ok, err := filepath.Match(pattern, "Dockerfile")
|
ok, err := filepath.Match(pattern, "Dockerfile")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Errorf("Bad .dockerignore pattern: '%s', error: %s", pattern, err)
|
utils.Errorf("Bad .dockerignore pattern: '%s', error: %s", pattern, err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue