Run the docker with -p 80:8787
will try to listen a Physical machine. and also the Apache
listen the 80
by default.
You can't run more than one programmer to listen the same PORT
, but if you just want to a map 80
which you open to the public to the backend server, you can use a Nginx
as your delegation server. and then you can run number of servers.
Here is simple config of your Nginx
server { # php/fastcgi
listen 80;
server_name domain1.com www.domain1.com;
access_log logs/domain1.access.log main;
root html;
location ~ \ {
server 127.0.0.1:8787;
server 127.0.0.1:8788;
server 127.0.0.1:8780;
}
}
And your container can run as following way:
docker run -d -p 8787:8787 quay.io/hemberg-group/scrna-seq-course-rstudio
docker run -d -p 8788:8787 quay.io/hemberg-group/scrna-seq-course-rstudio
And your Apache
server can be configuration with another PORT
, example 8780