I received my Docker for Mac Beta invite recently. I saw quite some hype on Twitter about it's arrival and was looking forward to give it a go. Needless to say I'm impressed
I've been a long time promoter and user of
Docker Toolbox + Kitematic It is not only really helpful for building Docker containers but has proven a great tool to run demos. I prefer to use the CLI (Command Line Interface) however, running a demo through with a GUI can be a deal breaker for some.
Installing Docker for Mac
Running through the installation process is straightforward. If a previous Docker Toolbox installation is detected you will be prompted to migrate from Toolbox to the the new Docker for Mac which is painless and quick. What's happening behind the scenes? We are throwing Virtualbox out the window and is no longer needed. Docker is now running on an Alpine Linux VM being powered by
xhyve which is a lightweight OSX Virtualization solution. Say what? Lighter, Faster, Stronger you get the message!
Unboxing Docker for Mac
Docker adds a Menu Bar icon which allows you to eventually launch Kitematic (currently not available),check logs and change settings. Runtime memory is set to 2GB as default and at later stage will be configurable.
Open the Mac terminal and run docker commands directly in the terminal. Mind Blown! Docker Engine and Docker-Compose are both available directly from my Mac console.
But wait, there's more! Docker for Mac includes a DNS server for containers that is integrated directly into Docker networking. Test containers can now resolve at docker.local in your web browser.
Testing Docker for Mac
Of course I want to test this with a real world container and not just a Hello World. I decided to use my Docker Monitoring project as the guinea pig. I cloned the project into a local folder on my Mac and then used docker-compose to start it up.
Docker-Compose downloaded the necessary images (cAdvisor, InfluxDB and Grafana) and started them up in no time at all. Everything worked as advertised. As you see in the screenshot below both cAdvisor and Grafana are resolving via docker.local + their respective ports. No additional configuration necessary to make this work. It just works right out of the box.
The Docker for Mac tool is an excellent utility which has instantly become part of my goto items from now on. I was in the past reluctant to rely on the Docker toolbox just due to the Virtualbox dependency. Now that Docker for Mac just runs right in the Mac console this makes my life a hell of lot easier.
I still have quite some exploring to do with Docker for Mac as it also supports ARM images such as Hypriot or any Raspberry PI images. Also, I will do a deep dive with networking and storage with Docker for Mac. I will investigate these in a follow-ups.
Be sure to sign-up for the Docker for Mac or Windows Beta and stay tuned.