2019-08-14 19:51:43 +00:00
|
|
|
// +build !windows
|
|
|
|
|
|
|
|
package docker
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io/ioutil"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
const dockerExe = "/usr/local/bin/docker"
|
|
|
|
const dockerdExe = "/usr/local/bin/dockerd"
|
2020-03-24 20:00:24 +00:00
|
|
|
const dockerrootconfdir = "/root/.docker/"
|
2019-08-14 19:51:43 +00:00
|
|
|
|
|
|
|
func (p Plugin) startDaemon() {
|
|
|
|
cmd := commandDaemon(p.Daemon)
|
|
|
|
if p.Daemon.Debug {
|
|
|
|
cmd.Stdout = os.Stdout
|
|
|
|
cmd.Stderr = os.Stderr
|
|
|
|
} else {
|
|
|
|
cmd.Stdout = ioutil.Discard
|
|
|
|
cmd.Stderr = ioutil.Discard
|
|
|
|
}
|
|
|
|
go func() {
|
|
|
|
trace(cmd)
|
|
|
|
cmd.Run()
|
|
|
|
}()
|
|
|
|
}
|