Review: Docker for Mac

Review: Docker for Mac

I received my Docker for Mac Beta invite recently. I saw quite some hype on Twitter about its arrival and was looking forward to giving 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 also proven a great tool for running demos.

I prefer to use the CLI (Command Line Interface); however, running a demo through 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 new Docker for Mac, which is painless and quick.

What's happening behind the scenes? We are throwing Virtualbox out the window, and it is no longer needed. Docker is now running on an Alpine Linux VM being powered by xhyve which is a lightweight OSX Virtualization. Say what? Lighter, Faster, Stronger, you get the message!

Check out @tiffanyfayj writeup on her testing of the Docker for Mac Alpha for more technical details and VPN usage.

Unboxing Docker for Mac

Docker adds a Menu Bar icon that eventually allows you to launch Kitematic (currently not available), check logs, and change settings. Runtime memory is set to 2GB by default and will later be configurable.

Docker Menu

Open the Mac terminal and run docker commands directly in the terminal. Your mind will be Blown! Docker Engine and Docker-Compose are both available directly from my Mac console.

docker cli

But wait, there's more! Docker for Mac includes a DNS server for containers that are integrated directly into Docker networking. Test containers can now be resolved 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 for Mac

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.

docker-monitoring compose test for Mac

Conclusion

The Docker for Mac tool is an excellent utility that has instantly become part of my go-to items from now on. In the past, I was reluctant to rely on the Docker toolbox due to its dependency on Virtualbox. Now that Docker for Mac runs right in the Mac console, this makes my life a hell of a lot easier.

I still have quite some exploring 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 into networking and storage with Docker for Mac. I will investigate these in a follow-up.

Be sure to sign-up for the Docker for Mac or Windows Beta and stay tuned.

Follow me

If you liked this article, Follow Me on Twitter to stay updated!