Docker Community Forums

Share and learn in the Docker community.

Access docker port from network outside the host

docker

(Motip274) #1

Hi,

I have an host with IP 10.110.X.Y and an httpd docker service with IP 127.17.0.2 and belong to docker gateway 127.17.0.1.
I’m trying to access the web server from outside but the routing between the HOST to the docker adapter is missing.

How to connect the HOST to the docker adapter.

Thanks
Moti


(Dvohra) #2

Set up port forwarding to a local machine.

ssh -i “docker.pem” -f -nNT -L 80:172.17.0.2:80 ubuntu@ec2-52-91-200-41.compute-1.amazonaws.com