How to set the password for Redis in Docker for Development?

I just spun a docker and found this error.

ERR Client sent AUTH, but no password is set

Then I realized I haven’t set the password. The traditional way is to create the redis.conf file and go with it but then again it is a lot of work as I would be maintaining another file.

Solution

If you are using Docker compose then simply override the CMD (command) like this:

command: redis-server --requirepass SUPER_SECRET

Tell your network!

0 Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>