Skip to content

Commit 115b509

Browse files
authored
fix: Add --load flag to buildx build command (#2514)
* fix: add --load to docker buildx build so images are available in daemon * chore: changeset * fix: missing loc
1 parent fd3260b commit 115b509

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

framework/.changeset/v0.15.15.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Add --load flag to docker buildx build so images are available in the Docker daemon

framework/docker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ func BuildImage(dctx, dfile, nameAndTag string, buildArgs map[string]string) err
427427
if os.Getenv("GITHUB_TOKEN") != "" {
428428
commandParts = append(commandParts, "--secret", "id=GIT_AUTH_TOKEN,env=GITHUB_TOKEN")
429429
}
430-
commandParts = append(commandParts, "-t", nameAndTag, "-f", dfilePath, dctx)
430+
commandParts = append(commandParts, "--load", "-t", nameAndTag, "-f", dfilePath, dctx)
431431
return RunCommand(commandParts[0], commandParts[1:]...)
432432
}
433433
commandParts := []string{"docker", "buildx", "build", "--build-arg", "CHAINLINK_USER=chainlink"}
@@ -437,7 +437,7 @@ func BuildImage(dctx, dfile, nameAndTag string, buildArgs map[string]string) err
437437
if os.Getenv("GITHUB_TOKEN") != "" {
438438
commandParts = append(commandParts, "--secret", "id=GIT_AUTH_TOKEN,env=GITHUB_TOKEN")
439439
}
440-
commandParts = append(commandParts, "-t", nameAndTag, "-f", dfilePath, dctx)
440+
commandParts = append(commandParts, "--load", "-t", nameAndTag, "-f", dfilePath, dctx)
441441
return RunCommand(commandParts[0], commandParts[1:]...)
442442
}
443443

0 commit comments

Comments
 (0)