The easiest way to install Docker on macOS

Antsy to get Docker up and running on your Mac? If so, give Docker Desktop a go and be developing in minutes.

dockerhero.jpg

Image: Docker

For many, the ideal cloud development platform is macOS. It's stable, offers an outstanding interface, and is pretty much everywhere. But for those who want to develop using Docker, what is the path of least resistance? From my experience, you cannot beat Docker Desktop for installing Docker on macOS. 

Don't get too excited, however. Docker Desktop doesn't automatically install an Apple-like GUI for the management and deployment of containers. What it does offer is a simplified installation of the Docker daemon (and the associated commands), a dock icon to give you quick access to your DockerHub repositories, quick access to the installation of Kitematic (for GUI-based management of containers … more on this in a bit), and other handy tools. But the single most important aspect of Docker Desktop is the installation of Docker.

SEE: Serverless computing: A guide for IT leaders (TechRepublic Premium)

Let's install and use Docker Desktop on macOS.

Installation

The installation of Docker Desktop is simple:

  1. Download the Docker Desktop installer .dmg file.
  2. Double-click the .dmg file and, when prompted, click and drag the files to Applications (Figure A).
  3. Allow the installation to complete.
dda.jpg

Figure A: Installing Docker Desktop on macOS.

You might also want to install Kitematic and Git on your Mac. To install Git, download the installer file, double-click on the downloaded file, and walk through the simple instructions. For Kitematic, don't use the entry in the Docker Desktop Whale menu (as that renders Kitematic unusable). Instead, download the latest version from GitHub, double-click the downloaded file, and walk through the simple instructions.

Usage

Once you install everything, you're ready to start working with Docker. You can either open up a terminal window and deploy your container from the command line (Figure B), or you can open Kitematic and start deploying via a handy GUI.

ddb.jpg

Figure B: Pulling down the latest NGINX image from the command line.

To open Kitematic, click on the Docker Desktop Whale icon and then click Kitematic. When you first attempt to use Kitematic, you will be prompted to give it accessibility privileges. From within the Security & Privacy window, make sure to unlock the tool and then click the checkbox, associated with Kitematic (Figure C), to give it the necessary privileges.

ddc.jpg

Figure C: The necessary permission changes for Kitematic.

Once you give Kitematic the necessary permissions, you can start it from either the Apple Launchpad or from the Docker Desktop Whale menu. Once Kitematic is running, search for an image on Docker Hub, and quickly deploy it (Figure D).

ddd.jpg

FIgure D: Deploying an NGINX container with Kitematic.

At this point, you are ready to start developing your cloud-based containers on the macOS desktop. Getting Docker installed via this method is painless and offers a few more tricks to be had than you'll find via other routes. 

Give this method of getting Docker up and running on your Mac and see if it doesn't have you working quickly and painlessly with Docker.

Also see