0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-14 09:00:43 +00:00
wp-docker-buildx/plugin/daemon.go

29 lines
477 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 (
dockerExe = "/usr/local/bin/docker"
dockerdExe = "/usr/local/bin/dockerd"
dockerHome = "/root/.docker/"
buildkitConfig = "/tmp/buildkit.json"
)
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()
2019-08-14 19:51:43 +00:00
}()
2020-03-24 20:49:10 +00:00
}