How to secure RedisInsights on a docker container

1.6k Views Asked by At

I have redis running in a docker container with docker-compose and I found this article that shows how to run redisinsights from the same docker host.

Run Redis Insights in Docker Compose

I can expose port 8001 to 443 publicly to something like https://redisinsights.mysite.com. Is there a straight forward way I can add a password that must be entered before redisinsights open? If I just set it up, anyone who goes to that URL will see my data which would be bad.

Here is the insecure docker-compose from that post:

redisinsights:
  image: redislabs/redisinsight:latest
  restart: always
  ports:
    - '8001:8001'
  volumes:
    - ./data/redisinsight:/db
2

There are 2 best solutions below

0
On

I don't think that's possible. I recommend to you remove redisinsight as a docker service and use a local GUI for seeing the data. You can use DataGrip or the redisinsight GUI which looks pretty nice.

Greetings!

0
On

If you are using Docker already, why don't you take advantage of kubernetes as well? :D

https://kubernetes.github.io/ingress-nginx/examples/auth/basic/ You can use k8s to deploy your image, wrap it with a secured ingress like so.