I am new to docker as well as I don’t have much knowledge regarding networking. Now, here is the scenario, I am in a private network and have 2 machines ( 184.108.40.206 and 220.127.116.11). I have my docker engine running on 163.96 . I created a new container that runs LDAP using docker run and the container gets the ip 172.17.0.2.
My command :
docker run -i -t -p 50389:389 -p 50636:636 myLDAPapplication /bin/bash
Now I want to connect to this container from 163.129, so that I can perform ldap operations from this host instead of 163.96. I have exposed port 389 and 636 in my dockerfile and mapped these ports to 50389 and 50636 respectively as you can see in the command. But still I am unable to connect to the container from 163.129.
However from inside the container, I am able to ping 163.129 machine.
Can anyone please help me in setting up this kind of setup??