Ref:
运行容器:

  1. docker run -d --hostname my-rabbit --name some-rabbit rabbitmq:3

This will start a RabbitMQ container listening on the default port of 5672. If you give that a minute, then do docker logs some-rabbit, you’ll see in the output a block similar to:

  1. =INFO REPORT==== 6-Jul-2015::20:47:02 ===
  2. node : rabbit@my-rabbit
  3. home dir : /var/lib/rabbitmq
  4. config file(s) : /etc/rabbitmq/rabbitmq.config
  5. cookie hash : UoNOcDhfxW9uoZ92wh6BjA==
  6. log : tty
  7. sasl log : tty
  8. database dir : /var/lib/rabbitmq/mnesia/rabbit@my-rabbit

RabbitMQ with management

Ref: https://codeburst.io/get-started-with-rabbitmq-on-docker-4428d7f6e46b

  1. docker run -d --hostname my-rabbit -p 15672:15672 -p 5672:5672 rabbitmq:3-management

admin console: http://localhost:15672/ guest:guest