mirror of
https://github.com/thegeeklab/drone-docker.git
synced 2024-11-23 21:30:39 +00:00
26 lines
441 B
Go
26 lines
441 B
Go
|
package plugin
|
||
|
|
||
|
import (
|
||
|
"io/ioutil"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
const dockerExe = "/usr/local/bin/docker"
|
||
|
const dockerdExe = "/usr/local/bin/dockerd"
|
||
|
const dockerHome = "/root/.docker/"
|
||
|
|
||
|
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)
|
||
|
cmd.Run()
|
||
|
}()
|
||
|
}
|