Docker for Mac

1 Aug 2016

Developers love Docker. You can see this from the amount of attention Docker has got the last couple of years. But, one of the biggest issues developers faced was the non-availability of Docker on platforms other than Linux.

There were options like Boot2Docker (which we previously covered) that made working with Docker possible on a non-Linux machine, but the experience was sub-optimal.

Now with the general availability of Docker for Mac and Windows, developers no longer need to have a Linux box to experience Docker in it's full glory.

Docker for Mac is a native Mac application, built from scratch. With a native user interface and auto-update capability, it is deeply integrated with OS X native virtualization, Hypervisor Framework, networking, and file system. This makes Docker for Mac faster and more reliable than previous ways of getting Docker on a Mac.

In this post, we'll take a look at Docker for Mac and see how to get up and running with the stable release.

For some intros to Docker, check part one and part two of our Docker overview. You can also check this post on how to create and share your first Docker image.

Installation

To get started with installation, download Docker from their website.

You'll get the disk image, aka the .dmg file, as the installer. Open the file and follow the steps as they appear. As the last step of installation, you'll be asked for permission. Enter your system password here to finish the process.

After the installation, Docker icon gets added to the status bar of your mac.

Here's how it looks:

Select Got it! on the pop up to finish the installation process. You can now open a terminal window and start using Docker commands as usual.

Options

Docker installs as any other Mac app and offers several options via its GUI. Select on the Docker icon on the status bar to reveal the options drop down.

You can update your installation, open the documentation, or even open Docker Kinematic (a GUI for Docker containers) directly from here.

However, the most important option is probably Preferences.

Select that to open the settings page:

Under the Advanced section, you can add any insecure registries and the registry mirrors that you plan to use. You also have options to add HTTP(S) proxy settings here.

Under the File Sharing section, you can manage the directories that can be mounted into Docker containers.

And the Privacy section lets you choose if you'd like to send usage and crash reports.

You can also uninstall or reset Docker to factory settings. The reset option can come in handy when you need to wipe out any config changes and start afresh.

Wrap Up

With stable native apps for Mac and Windows now available, Docker is one of the best ways to develop apps across every major platform.

The native app offers improved Docker tools integration, so all the Docker tools you need to develop locally are bundled in the app. Volumes can be mounted with very little fuss. And access to running containers on the localhost network is now easily available.

You can even use the in-container debugging with supported IDEs to help you live-debug projects, to iterate code quicker and with less effort.

Posted in Docker, Mac

triangle square circle

Did you enjoy this post?