networking - How to access docker container from another machine on local network -
i'm using docker windows( not using docker toolbox use vm) cannot see container machine on local network. in host perfect , runs well,however, want other people use container.
despite being posting same question in docker's forum , answer not show it. plus, have been looking here solutions found setting bridge option in virtual machine , , said before, using docker windows no use virtual machine.
docker version command
client: version: 1.12.0 api version: 1.24 go version: go1.6.3 git commit: 8eab29e built: thu jul 28 21:15:28 2016 os/arch: windows/amd64 server: version: 1.12.0 api version: 1.24 go version: go1.6.3 git commit: 8eab29e built: thu jul 28 21:15:28 2016 os/arch: linux/amd64
docker ps -a
container id image command created status ports names 789d7bf48025 gogs/gogs "docker/start.sh /bin" 5 days ago 42 minutes 0.0.0.0:10022->22/tcp, 0.0.0.0:5656->3000/tcp gogs 7fa7978996b8 mysql:5.7.14 "docker-entrypoint.sh" 5 days ago 56 minutes 0.0.0.0:8989->3306/tcp mysql
the container want use gogs working in port 5656.
when use localhost:5656 y 127.0.0.1:5656 work properly, when use local network ip (192.168.0.127) other machine container unreachable.
thanks in advance.
solution:
when installed docker windows, creates network called vethernet (dockernat) (usually ip 10.0.75.1)
my local machine had network called local area connection ip 192.168.0.172(with ip trying access other pcs).
so far, local machine had 2 networks conections went control panel > network , sharing center > change adapter settings selected 2 networks , right-click selected add bridge. create third network called ethernet.
at point, didnt know ip of ethernet network, executed ipconfig command show me ip 192.168.0.17(the settings of local area connection , vethernet (dockernat) disappeared , ips 10.0.75.1 , 192.168.0.172 stop working).
with new ip (192.168.0.17) tried other machine in network , access container(192.168.0.17:5656).
Comments
Post a Comment