feat: add option to specify buildkit config file path (#32)

This commit is contained in:
Albie
2021-07-08 08:00:51 +01:00
committed by GitHub
parent 380e304e7a
commit 904641bf10
3 changed files with 39 additions and 16 deletions

View File

@@ -52,8 +52,18 @@ func commandInfo() *exec.Cmd {
return exec.Command(dockerExe, "info")
}
func commandBuilder() *exec.Cmd {
return exec.Command(dockerExe, "buildx", "create", "--use")
func commandBuilder(daemon Daemon) *exec.Cmd {
args := []string{
"buildx",
"create",
"--use",
}
if daemon.BuildkitConfig != "" {
args = append(args, "--config", daemon.BuildkitConfig)
}
return exec.Command(dockerExe, args...)
}
func commandBuildx() *exec.Cmd {