feat: load buildkit config from string instead of file (#37)

This commit is contained in:
Robert Kaussow
2021-07-25 14:28:33 +02:00
committed by GitHub
parent 8f25682501
commit a5a561fd91
5 changed files with 19 additions and 21 deletions

View File

@@ -54,13 +54,13 @@ func commandInfo() *exec.Cmd {
func commandBuilder(daemon Daemon) *exec.Cmd {
args := []string{
"buildx",
"create",
"buildx",
"create",
"--use",
}
if daemon.BuildkitConfig != "" {
args = append(args, "--config", daemon.BuildkitConfig)
args = append(args, "--config", buildkitConfig)
}
return exec.Command(dockerExe, args...)
@@ -84,7 +84,7 @@ func commandBuild(build Build, dryrun bool) *exec.Cmd {
}
args = append(args, build.Context)
if ! dryrun {
if !dryrun {
args = append(args, "--push")
}
if build.Squash {
@@ -124,7 +124,7 @@ func commandBuild(build Build, dryrun bool) *exec.Cmd {
for _, arg := range build.Tags.Value() {
args = append(args, "-t", fmt.Sprintf("%s:%s", build.Repo, arg))
}
}
return exec.Command(dockerExe, args...)
}