0

So, i have a Docker container with an app that needs to connect to Redis instance on remote machine. There is no direct connection to that Redis host from Docker container or from Docker host, but i can establish port forwarding from Docker host to that Redis box.

Port forwarding established on Docker host: ssh -L 8810:REDIS_HOST:6379 someUser@someHost

Docker Container (App) -> requests to localhost:8810 or to DOCKER_HOST_IP:8810 
isn't forwarded to REDIS_HOST.

Do i need to modify somehow DOCKER_HOST port forwarding or it's hosts file to make that work?

1

It turns out that you need to add -g to SSH port forwarding and then use DOCKER_HOST ip to make requests from App in the container

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.