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.
Configuring the redis-cli tool
There is an excellent tool to connect with the Redis instance which is called redis-cli
. There are some Docker images for that, but we will install it on our Linux machine.
To install it, we can execute the following command:
sudo apt-get install redis-tools -y
Excellent, now we can connect and interact with our Redis container. The tool can perform the...