python - Assign one docker instance to each client -


i have docker instance exposes port host. host reserves port b docker instance, , client connecting port b on host communicating docker on port without knowing it.

currently, 1 client can access docker instance. want able manage multiple clients, each of them having own instance. server (python fine) receive connections clients on port (e.g. port 5555 all clients) , redirect each client own docker instance seamlessly.

this has exist, because basic stuff server, seem lack vocabulary find online. name of such system, , 1 exist?

i think need proxy server listen port a. when client connects port she/he redirected port b without noticing it. example docker apache server listen port 80 , forward request server e.g tomcat listens port 8080. eg.

docker run --name tomcat run -d tomcat docker run -v path/to/your/httpd.conf:/usr/local/apache2/conf/httpd.conf --name proxy -d --link tomcat:tomcatserver -p 80:80 httpd 

your httpd.conf should this:

# put after other loadmodule directives loadmodule proxy_module /usr/local/apache2/modules/mod_proxy.so loadmodule proxy_http_module /usr/local/apache2/modules/mod_proxy_http.so  proxyrequests off proxypreservehost on  <proxy *>     require granted </proxy>  proxypass / http://tomcatserver:8080 proxypassreverse / http://tomcatserver:8080 <location />      require granted </location> 

yyj y y 5 yep ptpy


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -