Docker Community Forums

Share and learn in the Docker community.

Making Dock Container Externally Available

Hi, I will explain my situation:

I have VirtualBox on my host machine running an Ubuntu 19.04 VM wich has Docker and Wordpress installed. I succesfully installed a container running Apache, which has a Wordpress as well.

I followed this guide in order to get it done:

So, it’s from my understanding that Nginx is installed on on VM (not container) in order to function as a web proxy, so all requests going to the VM through port 8081 are redirected to port 80 on container.

When I try to access the website locally, it works (only IP not hostnames, even though the guide says you can), when I try to access it through my host machine and onther VM on the same network, it works (the website is displayed differently).

So my question comes to the time of configuring my TP Link Router with Port forwarding in order to listen to requests through my external IP. So what I want is to whenever I put my external IP on the internet, my reequests to port 80 will go to my VM listening yo port 8081, which then will translate it internally to the container, is this reasoning right? Even though is set up, it does not work.

Im aware that name resolution will not work unless I have public DNS set up.