If you use the standard docker image for redis and switch to a custom configuration file, i.e. start the image with
docker run -it --rm --name redis -p 6379:6379 \
-v $(pwd)/data:/data \
-v $(pwd)/redis.conf:/usr/local/etc/redis/redis.conf \
redis:6 \
redis-server /usr/local/etc/redis/redis.conf --appendonly yes
it solely listens to the loopback device. Hence, you explicitly have to disable this
by commenting the bind
setting in redis.conf
, i.e. find the line bind 127.0.0.1
and write
# bind 127.0.0.1
If you do this, please activate ACLs, otherwise everyone can connect to your database.