Skip to content

Commit

Permalink
fix(docker): remove --builder=default from default args when use=buil…
Browse files Browse the repository at this point in the history
…dx (#4566)

refs #4392

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Jan 22, 2024
1 parent c6bc25c commit 2ced7ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/pipe/docker/api_docker.go
Expand Up @@ -73,7 +73,7 @@ func (i dockerImager) Build(ctx *context.Context, root string, images, flags []s
func (i dockerImager) buildCommand(images, flags []string) []string {
base := []string{"build", "."}
if i.buildx {
base = []string{"buildx", "--builder", "default", "build", ".", "--load"}
base = []string{"buildx", "build", ".", "--load"}
}
for _, image := range images {
base = append(base, "-t", image)
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/docker/docker_test.go
Expand Up @@ -1113,7 +1113,7 @@ func TestBuildCommand(t *testing.T) {
name: "buildx",
buildx: true,
flags: []string{"--label=foo", "--build-arg=bar=baz"},
expect: []string{"buildx", "--builder", "default", "build", ".", "--load", "-t", images[0], "-t", images[1], "--label=foo", "--build-arg=bar=baz"},
expect: []string{"buildx", "build", ".", "--load", "-t", images[0], "-t", images[1], "--label=foo", "--build-arg=bar=baz"},
},
}
for _, tt := range tests {
Expand Down

0 comments on commit 2ced7ac

Please sign in to comment.