Docker: Connectivity between Physical Machine - VM -Docker container -


i have started have experimentation docker. on windows host have virtual machine holds docker container. want have communication between host , container or may other vms , container.

  • host ip 192.168.2.10 subnet mask 255.255.255.0
  • vm ip 192.168.254.130 subnet mask 255.255.255.0
  • container gets ip 172.17.0.13

i have seen few blogs talking bridging still not sure , how that. not networking stuff.

a little guidance help.

thanks

edit: followed bridge-building not understand ip range give bridge, so, gave 192.168.254.1/24. command ip addr show bridge0 shows state unknown.

i'll assume using docker on windows linux host running on virtualbox. note default docker-machine creates nat adapter (with port forward) , host-only adapter, tricky different machines talk correct ip.

as answered adrian typically "publish" ports port forwarding, if container has communicate via many ports , running 1 such container / host easier start container via docker run --net host ..., way host's ethernet adapters directly visible within container (as discovered here).


Comments

Popular posts from this blog

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

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -