Merge pull request #15798 from calavera/volume_driver_host_config

Move VolumeDriver to HostConfig to make containers portable.
This commit is contained in:
Brian Goff
2015-09-08 22:05:40 -04:00
22 changed files with 181 additions and 78 deletions
+4 -12
View File
@@ -1382,22 +1382,14 @@ func createTmpFile(c *check.C, content string) string {
return filename
}
func buildImageArgs(args []string, name, dockerfile string, useCache bool) (string, error) {
id, _, err := buildImageWithOutArgs(args, name, dockerfile, useCache)
return id, err
}
func buildImageWithOutArgs(args []string, name, dockerfile string, useCache bool) (string, string, error) {
func buildImageWithOutInDamon(socket string, name, dockerfile string, useCache bool) (string, error) {
args := []string{"--host", socket}
buildCmd := buildImageCmdArgs(args, name, dockerfile, useCache)
out, exitCode, err := runCommandWithOutput(buildCmd)
if err != nil || exitCode != 0 {
return "", out, fmt.Errorf("failed to build the image: %s", out)
return out, fmt.Errorf("failed to build the image: %s, error: %v", out, err)
}
id, err := getIDByName(name)
if err != nil {
return "", out, err
}
return id, out, nil
return out, nil
}
func buildImageCmdArgs(args []string, name, dockerfile string, useCache bool) *exec.Cmd {