Today I wanted to mess around with redis, so I Downloaded a redis docker image. I ran into trouble to understand how I could access the redis-cli, I found out this can be done with a simple command:
docker exec -it CONTAINERNAME sh
After that you’ll get a command line with a # where you can type:
redis-cli
Congratulations, you’ve now accessed your redis instance. Simply run the following command to test if it’s working:
ping
Redis should return ‘Pong’
Happy coding!