55cc3b1d21
### 📖 Summary - Add option to enable buildkit debug output - Formats buildkit.toml using `github.com/pelletier/go-toml/v2` - Sets docker.io registry mirror based on daemon.mirror setting Co-authored-by: Patrick Schratz <pat-s@noreply.codeberg.org> Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/119 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: David Kovari <dakovari@gmail.com> Co-committed-by: David Kovari <dakovari@gmail.com>
29 lines
473 B
Go
29 lines
473 B
Go
package plugin
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
)
|
|
|
|
const (
|
|
dockerExe = "/usr/local/bin/docker"
|
|
dockerdExe = "/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()
|
|
}()
|
|
}
|