0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-10 03:30:40 +00:00
wp-docker-buildx/plugin/daemon.go

27 lines
470 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"
const dockerdExe = "/usr/local/bin/dockerd"
2020-03-24 20:49:10 +00:00
const dockerHome = "/root/.docker/"
const 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()
}()
2020-03-24 20:49:10 +00:00
}