This was probably asked already, but so far I can't find any detailed explanation at all, and the existing documentation seems as if it was written for some kind on psychic who supposed to know everything.
As per this manual, I added the container
docker run -d --hostname my-rabbit --name some-rabbit rabbitmq:latest
Then I checked it to receive the container ip
docker inspect some-rabbit
Checked ports with
docker ps
And tried to connect in the browser with this formula
https://{container-ip}:{port}
It did't work.
Am I'm doing something wrong, or maybe I am supposed to add something additional, like a container for apache or other stuff?
EDIT
As I understand, after creating some-rabbit container, now I need to run Dockerfile to create image? (This whole thing is confusing to me). How am I supposed to do that? I mean, I saw command docker build -f /path/to/a/Dockerfile
but if for example I placed the Dockerfile in second path D:\Docker\rabbitmq
, how I supposed to get there? (the path doesn't seems to be recognized)
If you open your Docker engine, you will see the RbbitMQ container set and running. If you open http://localhost:15672/ on a browser, you will be able to access the management Ui, and now you can log in using the docker-compose set username and password. And now you can see the RabbitMQ instance is up and running.
To access it, open your web browser and type "localhost:3000" into the address bar. This will take you to the home page of the server. This is how you access the container. Once you get the ip you can access your web app in the browser such as http://<ip of your virtualbox>:8080.
You are using the wrong image which doesn't have the rabbitmq_management plugin enabled. Change rabbitmq:latest
to rabbitmq:management
.
On dockerhub they are using the command:
docker run -d --hostname my-rabbit --name some-rabbit rabbitmq:3-management
If you want to go to the UI on localhost:15672
make sure to expose the port by adding -p 15672:15672
to the above command.
The management image is just the rabbitmq latest image with the management plugin enabled. Here is the dockerfile for rabbitmq:management
FROM rabbitmq RUN rabbitmq-plugins enable --offline rabbitmq_management EXPOSE 15671 15672
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With