My host network is Win10 pro with HyperV disabled. I am trying to run 
docker projects using vagrant. Have a question about networking in docker 
but it sort of involving docker and vagrant. Hope someone may help.
In my vagrantfile, I created a private network with an ip:

config.vm.network "private_network", ip:"192.168.33.10"

I also instructed the vagrantfile to install ubuntu. Once the ubuntu is 
installed, I created a network for the particular open source project I 
want to run. 

For example: docker network create mybridgenetwork

When I inspect this network, I found something perplexing. There is a 
segment in the config file that said this:

...
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
...

On my windows host, I tried to ping 172.18.0.0 or 172.18.0.1, I got no 
response.
When I pinged the private network specified in the vagrantfile, I got reply.

So, when I try to run a yml compose file using vagrant, I should use the 
private IP stated in the vagrantfile (192,168.33.10) and not the gateway's 
address 172.18.0.1

Am I correct?

What is the relationship between 172.18.0.1 (the IP of the docker network 
gateway) and 192,168.33.10 (the private network IP stated in my 
vagrantfile)?

Thanks in advance.

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/e675743b-0d33-40ff-b1ea-01174faad39d%40googlegroups.com.

Reply via email to