networking - How to hide Docker containers behind a single hostname -


I am very new to the Docker. I started by coming with VM mentality, but I know that it is VMs or Even traditional LACC uses completely different paradigms from containers.

The biggest challenge is to understand how networking works. I am trying to use a docker to run many services on one machine, in order to avoid some ports, to avoid some ports.

I want to access all of them using the host machine's FQDN. DNS needs to worry about adding container FQDN. I am forwarding the respective container ports to unused host ports. .

The problem is that, when I try to use the services from my browser, it is redirected to the container's FQDN, which can not solve it. The result is "server not found" error

Is there any way to hide all the containers behind the FQDN of the host without ever fixing the FQDN of the containers?

You can use a separate external port to each docking container and then an NGX Or Apache that reverse the proxy requests I had to create something that takes everything in a host name and then passes through all the traffic to all containers and ports.

The difficulty is to have new addresses every time they are made in the Docker Containers. When you start, you can understand your addresses dynamically and start proxy containers at those addresses. From the address you can catch those addresses, they are with the 'Docker Inspect' and you want to use the data, or to capture related data, using one of these libraries like Dokker-PA You can.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -