Docker Community Forums

Share and learn in the Docker community.

Proxy based on domain to my mysql container

docker

(Douglasjam) #1

I have one server with N dockers containers, each one have one server, it can be nginx, mysql, postgresql.

At the moment I can proxy my 80/443 connections based on my domain to dockers containers with nginx proxy, but I’m not getting how to proxy mysql containers.

I already tried with nginx, but seems only support http/s servers, and iptables i can not because it does not support domain names.

Per example: some mysql connection mysql://domain:3306 -> containerZ:3306

Does anyone have one idea to help me?


(Douglasjam) #2

i just figure out that is not possible with other protocols to handle dns names, ill just use port redirection provided by docker