![docker for mac access container docker for mac access container](https://www.vermasachin.com/static/images/Docker-container-Mac-Internals-REST-communication-hyperkit.png)
DOCKER FOR MAC ACCESS CONTAINER MAC OS
Docker Desktop for Mac is a complete development environment deeply integrated with the Mac OS Hypervisor framework, networking, and filesystem. The Docker Desktop Dashboard is the central location for all Docker containers and applications running in your Docker instance. In the Solution Window, right click the DockerDemo project and select Add > Add Docker Support : Visual Studio for Mac will automatically add a new project to your solution called docker-compose and add a Dockerfile to your existing project. Docker Desktop for Mac is an easy-to-install desktop app for building, debugging, and testing Dockerized apps on a Mac. Now that Docker is successfully installed on your Mac, it is time to configure some basic options for Docker Desktop. You may of course use the bip setting approach to ensure that your default bridge never ever clashes with the API endpoint's IP you are trying to hit. The created project contains all the basics you need to build and run an ASP.NET Core web site.
![docker for mac access container docker for mac access container](https://cdn-images-1.medium.com/fit/t/1600/480/1*UbVB0ZOiZLEnBpzENLIuXA.png)
The investigation was all done using Mac OS Catalina 10.15.6, Docker desktop CE 2.3.0.4 / Engine 19.03.12. I hope this helps someone and may explain why it seemed to work sometimes or it works after factory reset or after doing a network prune. I undid all the suggested fixes in this thread including the daemon json bip config and the extra_hosts suggestion from docker-compose and the API was still able to connect. I was then able to connect to my VPN protected API. I removed the offending user-defined bridge using I listed out all my network bridges usingĭocker network inspect docker network ls -q``Īnd found that one of my network bridge's subnet was set to 172.18.0.0/16 Within my container, I was using curl to simulate an API call to an IP address which was behind a corporate VPN.Īfter much tweaking around, I found that my issue was because of a subnet clash with the 172.18.xx.xx IP address. I tried most of the suggestions in this thread and finally realised the root cause of the issue.