Access your redis cli from a docker

Sami C.
1 min readApr 24, 2019

--

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!

--

--

Sami C.
Sami C.

Written by Sami C.

Freelance Software Engineer

No responses yet