You are not logged in.
Hi!
I think I have a rather easy problem, but I can't get it solved.
I have an Ubuntu host running Virtualbox with archlinux in a bridged network. I can ssh from my host into the virtual machine as it has got an IP address from my router.
I installed docker and started an nginx container. When I do a wget from the virtual machine to the container it works.
My goal is to reach the webserver from my host browser, but I can't get it solved.
I tried to add the following iptables rule within the virtual machine, but I still can't connect from my host browser into the docker container.
(sudo iptables -t nat -A PREROUTING -i enp0s3 -p tcp --dport 80 -j DNAT --to 172.17.0.2:80)
Any suggestions? Thanks!
Last edited by orcane (2016-01-23 14:05:37)
Offline
Solved, I needed to explicitly also use the public parameter -p with the port mapping. I had the declaration in the Dockerfile and the docker-compose.yml.
Offline