diff --git a/integration-cli/docker_utils.go b/integration-cli/docker_utils.go index a123ca2dc4..7e710b3bc3 100644 --- a/integration-cli/docker_utils.go +++ b/integration-cli/docker_utils.go @@ -60,7 +60,7 @@ func NewDaemon(t *testing.T) *Daemon { } // Start will start the daemon and return once it is ready to receive requests. -// You can specify additional daemon flags (e.g. "--restart=false"). +// You can specify additional daemon flags. func (d *Daemon) Start(arg ...string) error { dockerBinary, err := exec.LookPath(dockerBinary) if err != nil { @@ -71,10 +71,15 @@ func (d *Daemon) Start(arg ...string) error { "--host", d.sock(), "--daemon", "--debug", "--graph", fmt.Sprintf("%s/graph", d.folder), - "--storage-driver", d.storageDriver, - "--exec-driver", d.execDriver, "--pidfile", fmt.Sprintf("%s/docker.pid", d.folder), } + if d.storageDriver != "" { + args = append(args, "--storage-driver", d.storageDriver) + } + if d.execDriver != "" { + args = append(args, "--exec-driver", d.execDriver) + } + args = append(args, arg...) d.cmd = exec.Command(dockerBinary, args...)