mirror of
https://github.com/thegeeklab/drone-docker-buildx.git
synced 2024-11-01 02:20:40 +00:00
30 lines
478 B
Go
30 lines
478 B
Go
package plugin
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
)
|
|
|
|
const (
|
|
dockerBin = "/usr/local/bin/docker"
|
|
dockerdBin = "/usr/local/bin/dockerd"
|
|
dockerHome = "/root/.docker/"
|
|
buildkitConfig = "/tmp/buildkit.toml"
|
|
)
|
|
|
|
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()
|
|
}()
|
|
}
|