Confluent cli and Confluent Docker

I am running Confluent according to step 1 in these instructions:

Works fine and I can open the web console.

I would like to use Confluent cli to interact with it, and have installed this “outside docker” in a folder on the same computer running docker.

How can I connect the confluent cli client to the Confluent instance running in the Docker container?

there should be a hidden directory
.confluent in your home directory
create java.config file there with the following:

bootstrap.servers={{ BROKER_ENDPOINT }}
security.protocol=SASL_SSL required username='{{ CLUSTER_API_KEY }}' password='{{ CLUSTER_API_SECRET }}';

for reference

I am trying to use “confluent login” to log in to my cluster, but then I am asked for username and password. Where can I find the username and password to use?

I must also provide the --url parameter which points to “Metadata service URL. Must set flag or CONFLUENT_MDS_URL.” Where can I find this URL? Is it the broker URL/port?

broker            /etc/confluent/docker/run        Up>9092/tcp,:::9092->9092/tcp,                                        

no it’s not the brokers URL

as you said above your configuration was done as described in the quickstart documentation

afaik there is no MDS configured at all and no need to use confluent login.

what would you like to do with the cluster?
produce some data?
check the config?

I am trying to follow this tutorial, and it uses confluent cli and not the web interface:

I see but in your first post you mentioned you’re trying to connect with cli from outside docker and that your setup ist docker-based.

so would please clarify what you try to do?
confluent local works, afaik, only with a local installation as described in
the mentioned quickstart.