mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-16 03:52:12 +02:00
fix(docker): remove --builder=default from default args when use=buildx (#4566)
refs #4392 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
c6bc25ca69
commit
2ced7acdd9
@ -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)
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user