Starting a Redis container

In your terminal, execute the following:

$ docker run -d -p 6379:6379 --name redis redis

This will start a Redis container with the following setup:

  • -d: Specifies we want to run the container in daemon mode (background process).
  • -p: Allows us to expose port 6379 on the container to our local machine. This are needed for Nameko to communicate with Redis.
  • --name: Sets the container name to redis.

You can check that your new Redis 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.