$ docker run -d --hostname my-rabbit --name some-rabbit -p 15672:15672 -p 5672:5672 rabbitmq:3-management
Here the default settings include user: user pass: user rabbitmq access port : 5672 rabbitmq mgmnt GUI port : 15672
You can browse the mgmnt GUI using http://localhost:15672/
copy send and recive example of hello-world exmaple from this tutorial https://www.rabbitmq.com/tutorials/tutorial-one-go.html
in your program folder this should be structure
build image
Now, your rmq server and client programs should run in same network.
Since in above example, the rmq server is exposed on host network, to access that, you need to run this client container with
host
network.In actual deployment, you need to create a docker network, and put all server clients on that network, so all clients can access the server.
check the bitnami page mentioned in above link. It is explained there.