Example invocation of a RabbitMQ docker container (use -d
instead of -t -i
to run in the background):
sudo docker run -t -i --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
Example of controlling the rabbitmq-server
inside the container using rabbitmqctl
(also inside the container).
sudo docker exec rabbitmq su rabbitmq -- /usr/lib/rabbitmq/bin/rabbitmqctl status
Thanks @joshes, it worked for me as well.