I want to run RabbitMQ in a Docker container. So I found this guide which states that all you have to do is run this command:
docker run -d --hostname my-rabbit --name some-rabbit rabbitmq:3-management
And after that, RabbitMQ should be available in your browser on http://container-ip:15672. I'm not entirely sure what "container ip" is, but I assume it's localhost when running it on my own PC. But when I open that, I just get a blank page, with an error in the bottom:
undefined: There is no template at js/tmpl/login.ejs undefined
Now this seems to suggest that maybe there is something wrong with the image. But then I found another post here on StackOverflow in which it is suggested to run the same image (as far as I can see) but with a different command:
docker run -it --rm --name mymq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
If I run this, it works just fine. Can anyone tell me why this is? To me it seems like I'm running the exact same image, just in a slightly different way?
Update:
I found this post where someone had the same error. People seems to have solved it by changing configs or re-installing RabbitMQ. However, that doesn't explain why a newly started container exhibits this behaviour and only when started in a certain manner.
