Make sure you have docker CE installed and running, then start container:

docker run -p 15672:15672 -p 5672:5672 --name rabbitmq rabbitmq:management
  • -p {localhost port}:{container port}: exposes container port on localhost port
  • --name {name}: assign name to container

Check the Management web site by opening the web browser and navigating to:

http://localhost:15672

login using the guest user (password guest)

On the terminal you started docker, hit Ctrl+C to stop it.

To run as a daemon include -d:

docker run -d -p 15672:15672 -p 5672:5672 --name rabbitmq rabbitmq:management

You may get an error:

docker: Error response from daemon: Conflict. The container name "/rabbitmq" is already 
in use by container "1c97bba665316509427b0ceb2832338f0d9520fd3b5cd20965a7330f48307146". 
You have to remove (or rename) that container to be able to reuse that name.

See 'docker run --help'.

you can just omit use a different name (–name), omit the name altogether (the container will be identified by an autogenerated ID) or remove the previous container before, with:

docker container rm rabbitmq

References:

Categories: TL;DR

0 Comments

Leave a Reply

Avatar placeholder