How RabbitMQ docker image from docker hub run locally?

Viewed 44
I want to use Rabbitmq from the docker hub in my application, I need to configure how the container will run locally. Basically, I need to get the URL so I can use it in my application.

I pulled the RabbitMQ:latest from docker hub.

docker pull rabbitmq

Then run with the command (pull & run):

docker run -d --hostname my-rabbit --name some-rabbit -p 8081:15672 rabbitmq

Then I was trying to run in the browser with :

http://localhost:8081 or http://host-ip:8081

But localhost refused to connect.

Does anyone have any reference to getting this configuration?

0 Answers
Related