drone-docker/plugin/daemon.go

28 lines
437 B
Go
Raw Normal View History

2021-01-17 12:06:23 +00:00
package plugin
import (
"io/ioutil"
"os"
)
const (
dockerExe = "/usr/local/bin/docker"
dockerdExe = "/usr/local/bin/dockerd"
dockerHome = "/root/.docker/"
)
2021-01-17 12:06:23 +00:00
func (p Plugin) startDaemon() {
cmd := commandDaemon(p.settings.Daemon)
if p.settings.Daemon.Debug {
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
} else {
cmd.Stdout = ioutil.Discard
cmd.Stderr = ioutil.Discard
}
go func() {
trace(cmd)
2022-04-25 18:35:43 +00:00
cmd.Run()
2021-01-17 12:06:23 +00:00
}()
}