woodpecker-docker-buildx/plugin/daemon.go

30 lines
568 B
Go
Raw Permalink 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 (
dockerExe = "/usr/local/bin/docker"
dockerdExe = "/usr/local/bin/dockerd"
dockerHome = "/root/.docker/"
buildkitConfig = "/tmp/buildkit.toml"
buildkitConfigTemplate = "[registry.\"%s\"]\n ca=[\"%s\"]\n"
)
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
}
go func() {
trace(cmd)
cmd.Run()
}()
2020-03-24 20:49:10 +00:00
}