Running the Redis instance

The image was downloaded, then we will start the Redis instance for our application. The command can be:

docker run -d --name redis --net twitter -p 6379:6379 redis:4.0.6-alpine

We have interesting attributes here. We named our Redis instance with redis, it will be useful for running our application in containers in the next chapters. Also, we exposed the Redis container ports to the host machine, the command argument used for that is -p. Finally, we attached the container to our Twitter network.

Good, the Redis instance is ready to use. Let's check out the Spring Data Reactive Redis stuff.

Get Spring 5.0 By Example 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.