diff --git a/builder/docker/driver_docker.go b/builder/docker/driver_docker.go index c052131f8..59fb8f9c3 100644 --- a/builder/docker/driver_docker.go +++ b/builder/docker/driver_docker.go @@ -103,19 +103,19 @@ func (d *DockerDriver) Import(path string, changes []string, repo string) (strin cmd.Stderr = &stderr stdin, err := cmd.StdinPipe() - if err != nil { + if err != nil { return "", err } args := []string{"import"} - for _, change := range changes { - args = append(args, "--change", change) - } + for _, change := range changes { + args = append(args, "--change", change) + } - args = append(args, "-") + args = append(args, "-") args = append(args, repo) - cmd := exec.Command("docker", args...) + cmd := exec.Command("docker", args...) // There should be only one artifact of the Docker builder file, err := os.Open(path) @@ -124,8 +124,8 @@ func (d *DockerDriver) Import(path string, changes []string, repo string) (strin } defer file.Close() - log.Printf("Importing container with args: %v", args) - + log.Printf("Importing container with args: %v", args) + if err := cmd.Start(); err != nil { return "", err }