diff --git a/commands/create.go b/commands/create.go index 657d6618..49d5ce38 100644 --- a/commands/create.go +++ b/commands/create.go @@ -119,6 +119,10 @@ func runCreate(dockerCli command.Cli, in createOptions, args []string) error { return err } } else { + if dockerCli.CurrentContext() == "default" && dockerCli.DockerEndpoint().TLSData != nil { + return errors.Errorf("could not create a builder instance with TLS data loaded from environment. Please use `docker context create ` to create a context for current environment and then create a builder instance with `docker buildx create `") + } + ep, err = getCurrentEndpoint(dockerCli) if err != nil { return err