Adding driver changes.

This commit is contained in:
Ladar Levison 2018-12-17 22:37:32 -06:00
parent 21fdbadf04
commit 10095678c8
1 changed files with 8 additions and 8 deletions

View File

@ -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
}