I have created successfully(all is working) docker-compose file in my linux virtualbox machine. Then I took it to my mac. After creating the containers I tried to access the webpage, but browser refused to access it. I then took official php container and tried that with this compose file, it is also not working in mac. I think the problem is the creation of a static ip, but can not figure out what I am doing wrong?
What am i doing wrong in this compose file(how can i create the static ip that works in mac)?
Why static ip works in linux, but not in mac?
For the future where can I find information about the differences of network creation to linux and mac host(how they different and why)?
My docker-compose file:
- subnet: 10.5.0.0/16
I have found this post from stackoverflow.com/. In it user @zainengineer writes that “Modern docker-compose will automatically create containers with static ip for you”. I can not understand, does that mean, when I create container using docker-compose v3 that the container ip is stored somewhere and because of that static ip is only in v2? I have not found any additional information about that in docker documentation.