Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker buildx create command is failing when there is an existing builder created with a context creation #2345

Open
3 tasks done
dvdoron opened this issue Mar 18, 2024 · 0 comments

Comments

@dvdoron
Copy link

dvdoron commented Mar 18, 2024

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Starting buildx version 0.13.0, the behavior of the "docker buildx create" command has changed.

The creation of a new builder fails when there is an existing builder already. In my case,
I'm creating a context called "builder," so all the builds will run in a remote docker host like this:

docker context create builder --docker "host=tcp://xx.xx.xx.xx:2367"

Then, I need to create the builder (or modify the one made with the context creation) so it will use the docker-container driver to create OCI images.

docker buildx create --name builder --use builder

On version 0.12.1 of the buildx extension, I got a warning that the builder is exist
WARNING: instance name "builder" already exists as context builder

On version 0.13.0, I got this error instead:
ERROR: instance name "builder" already exists as context builder

Expected behaviour

Throw a warning message, and continue with the OCI image build:
WARNING: instance name "builder" already exists as context builder

Actual behaviour

It's throwing an error message and exiting with exit code 1
ERROR: instance name "builder" already exists as context builder

Buildx version

0.13.0

Docker info

No response

Builders list

NAME/NODE     DRIVER/ENDPOINT   STATUS    BUILDKIT               PLATFORMS
builder       docker                                             
 \_ builder    \_ builder       running   v0.11.7+d3e6c1360f6e   linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/arm64, linux/riscv64, linux/ppc64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
default*      docker                                             
 \_ default    \_ default       running   v0.11.7+d3e6c1360f6e   linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/arm64, linux/riscv64, linux/ppc64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6

Configuration

Build logs

No response

Additional info

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant