mirror of
https://github.com/thegeeklab/drone-docker.git
synced 2024-10-31 18:30:41 +00:00
28 lines
426 B
Go
28 lines
426 B
Go
package plugin
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
)
|
|
|
|
const (
|
|
dockerExe = "/usr/local/bin/docker"
|
|
dockerdExe = "/usr/local/bin/dockerd"
|
|
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 = io.Discard
|
|
cmd.Stderr = io.Discard
|
|
}
|
|
go func() {
|
|
trace(cmd)
|
|
_ = cmd.Run()
|
|
}()
|
|
}
|