February 2019
Intermediate to advanced
240 pages
5h 25m
English
We’ve just started Redis using Compose and saw from the output that it was running. However, since we’re still getting familiar with Docker, let’s manually connect to the Redis server and interact with it to prove to ourselves it really does work.
A quick way to do this is using the Redis command-line interface (redis-cli). We can leverage the same redis image, which already has redis-cli installed. Handy.
Rather than having to set up a new, separate service in Compose, we can piggyback on the existing redis service, since it uses the redis image we need. Using what we learned in Running One-Off Commands, we can run redis-cli and connect to our Redis server with the following command:
| | $ docker-compose ... |
Read now
Unlock full access