R
R
RR402020-05-06 19:36:28
Nginx
RR40, 2020-05-06 19:36:28

How to enable a Docker container with Docker Proxy and Nginx on the same server?

There is a server on Ubuntu 18.04, the Discourse forum is running in the Docker container, clients access it through Docker Proxy

root      9798  0.0  0.1 479264  3952 ?        Sl   May03   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 443 -container-ip 172.17.0.2 -container-port 443
root      9810  0.0  0.1 479264  4184 ?        Sl   May03   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 80 -container-ip 172.17.0.2 -container-port 80


There is a need to install Nginx, php-fpm on the server and run an application that will also require port 80 and 443, respectively, but it will work outside the docker container.

What is the right thing to do in this case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2020-05-06
@KingstonKMS

Set up nginx on the host as a proxy server. Docker container map to other ports and proxy requests to them

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question