Sunday, February 25, 2018

Setup vagrant but cannot ping other network ip address “Destination Host Unreachable”

I spend many days to figure it out my problem in Vagrant. After I posted my question in stackoverflow, nobody is helping me instead they downvoted my post.

https://stackoverflow.com/questions/48899409/setup-vagrant-but-cannot-ping-other-network-ip-address-destination-host-unreach

Sad! really sad. :( curse you!!!


But anyway, I solved it in my own way. I found this article below
https://github.com/moby/moby/issues/27818

It's simply my docker IP address clashed with my company IP address because when you create the container by default it will create 172.18.xx.xx IP address. Boom! Destination unreachable.... blah blah.

So, I just create a custom docker network and when I checked it created IP address that start 172.19.xx.xx

$ docker network create --driver=bridge --subnet=172.20.0.0/16 --gateway=172.20.0.0 vbroker-network-v1

updated 2018-0720:
docker network create --driver=bridge --subnet=172.28.0.0/16 --gateway=172.28.5.254 vbroker-network

then in the docker-compose.yml, just added
networks:
  default:
    external:
      name: vbroker-network



Eureka!



No comments:

Post a Comment

free online comma separating tool

https://delim.co/#