Starting a RabbitMQ container

In your terminal, execute the following:

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

This will start a RabbitMQ container with the following setup:

  • -d: Specifies we want to run the container in daemon mode (background process).
  • -p: Allows us to expose ports 5672 and 15672 on the container to our local machine. These are needed for Nameko to communicate with RabbitMQ.
  • --name: Sets the container name to rabbitmq.

You can check that your new RabbitMQ container is running by executing:

$ docker ps

Get Python Programming Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.