vps - How to make docker container to be accessed only in intranet -


i want run docker container in server, , expose specific port other server in same intranet. don't want container can accessed internet outside.

is there solution situation?

any appreciated.

if host computer running on windows, can configure firewall allow specific port accessed machine. option configure boot2docker (via iptables) restrict access specific ip address. think works current session: have edit boot2docker image , add used permanently. , drawback docker images running in docker inside boot2docker affected change.

so, suggestion restrict access on host computer side, such as:

c:\>boot2docker init c:\>boot2docker c:\>boot2docker ssh -l 0.0.0.0:8080:localhost:8080 docker@boot2docker:~$ docker run -p 8080:8080 mycontainer 

and restrict port 8080 on firewall level of host computer.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -