drone-docker-buildx/plugin/daemon.go

30 lines
478 B
Go
Raw Normal View History

package plugin
2019-08-14 19:51:43 +00:00
import (
"io"
2019-08-14 19:51:43 +00:00
"os"
)
const (
dockerBin = "/usr/local/bin/docker"
dockerdBin = "/usr/local/bin/dockerd"
dockerHome = "/root/.docker/"
buildkitConfig = "/tmp/buildkit.toml"
)
2019-08-14 19:51:43 +00:00
func (p Plugin) startDaemon() {
cmd := commandDaemon(p.settings.Daemon)
if p.settings.Daemon.Debug {
2019-08-14 19:51:43 +00:00
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
} else {
cmd.Stdout = io.Discard
cmd.Stderr = io.Discard
2019-08-14 19:51:43 +00:00
}
2019-08-14 19:51:43 +00:00
go func() {
trace(cmd)
_ = cmd.Run()
2019-08-14 19:51:43 +00:00
}()
2020-03-24 20:49:10 +00:00
}