---
title: "Docker for Mac : The Complete Installation Guide"
description: "Get your Docker for Mac environment set up by installing Docker on Mac with the brew installer docker command and a whole lot more!"
canonical: "https://adamtheautomator.com/docker-for-mac/"
---

# Docker for Mac : The Complete Installation Guide

> Get your Docker for Mac environment set up by installing Docker on Mac with the brew installer docker command and a whole lot more!

Source: https://adamtheautomator.com/docker-for-mac/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Docker for Mac : The Complete Installation Guide](https://adamtheautomator.com/wp-content/uploads/2021/09/How-to-Set-Up-Docker-on-your-Mac.jpg)

# Docker for Mac : The Complete Installation Guide

[![](https://secure.gravatar.com/avatar/f2bb8c08ca9aeeb3e441d96a85524e6400e457f0452d192abaaefcb681d7f810?s=192&d=mm&r=g)John Case](https://adamtheautomator.com/author/john-case/)14 September 20215 min. read

Categories: [DevOps](/category/devops/)

Tags:[Docker](/tag/docker/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Installing Docker for Mac Using Engine with Homebrew](#installing-docker-engine-with-homebrew)
*   [Installing Docker Desktop with Homebrew](#installing-docker-desktop-with-homebrew)
*   [Installing Docker Desktop on macOS with a Disk Image](#installing-docker-desktop-on-macos-with-a-disk-image)
*   [Configuring Docker for Mac](#configuring-docker-for-mac)
*   [System Resources](#system-resources)
*   [File Sharing](#file-sharing)
*   [Conclusion](#conclusion)

You can install and run Docker on all major operating systems; If you have a Mac and aren’t quite sure how to get started, no worries, this Docker for Mac tutorial has you covered. You’ll learn how to install Docker for Mac and get set up.

This tutorial will guide you, step-by-step, through all installation steps and get you on the path to running Docker containers on your Mac in no time.

## Prerequisites

This tutorial will be a hands-on demonstration. If you’d like to follow along, be sure you have the following:

*   macOS version 10.14 or newer. This tutorial will use macOS Big Sur, version 11.5.1.

## Installing Docker for Mac Using Engine with Homebrew

Even though you can install Docker many different ways, if you’re on macOS, the [Homebrew](https://brew.sh/) package manager is probably the easiest. Before starting, be sure you’ve [installed Homebrew](https://docs.brew.sh/Installation).

The Homebrew package manager for macOS offers two ways to install Docker. You can either install just the Docker engine or install [Docker Desktop](https://docs.docker.com/desktop/install/mac-install/). Let’s first cover how to install the Docker Engine.

To install the Docker Engine:

1\. Open the macOS terminal and run the following command. This command tells Homebrew to download and install the package called `docker`. Homebrew will automatically find the latest version.

```bash
#Install Docker Engine
brew install docker
```

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-62.png)

Installing the Docker Package via Brew

2\. Download and install both the `docker-machine` and `virtualbox` packages. Docker requires both of these to run correctly on macOS.

```bash
#Install Docker Machine
brew install docker-machine
```

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-63.png)

Installing the Docker Machine package via Brew

```yaml
#Install VirualBox
brew install --cask virtualbox
```

> _Note the `--cask` switch on the install command for VirtualBox. The `--cask` option is how Homebrew can install graphical interface applications. Since VirtualBox is a graphical interface application, the `--cask` switch must be included in the command._

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-64.png)

Install VirtualBox Package via Brew

3\. After installing VirtualBox, you will likely receive a warning that macOS blocked the install. To allow the install, click **Open Security Preferences.**

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-65.png)

Opening the Security Preferences

4\. Click on the **Details** button, check the box labeled **Oracle America, Inc,** and click OK. Oracle owns VirtualBox.

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-66.png)

Viewing Details on a specific application developer

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-67.png)

Allowing the Oracle America, Inc. developer to load

Related:[Use Docker Stop Containers Without Screwing Things Up!](https://adamtheautomator.com/docker-stop-containers/)

## Installing Docker Desktop with Homebrew

If you’d prefer a graphical interface to Docker, Docker Desktop is your friend. If you haven’t installed Docker Engine yet, you can install Docker Desktop.

> _Do not try to install Docker Engine with Docker Desktop. Docker engine requires VirtualBox, as shown earlier, which can conflict with Docker Desktop. Docker Desktop is not compatible with VirtualBox versions prior to 4.3.30._

To install Docker Desktop, in the terminal:

1.  Run the command below. Note that the `--cask` switch is required for installing graphical interface applications with Homebrew.

```bash
#Install Docker Desktop
brew install --cask docker
```

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-68.png)

Install the Docker Desktop via Brew

2\. After Homebrew completes the install, open Docker in your terminal with the following command.

```bash
#Run Docker Desktop
open /Applications/Docker.app
```

3\. Click the **Open** button to open Docker Desktop. You’ll see this prompt when you run Docker Desktop for the first time.

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-69.png)

Open the Docker application

4\. When prompted, click the OK button to allow privileged access (sudo access) to give Docker Desktop permission to set up internal networking for the containers to talk to each other. Clicking **OK** will install the Docker helper tool that coordinates various Docker activities for the Docker Engine.

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-70.png)

Allowing Docker Desktop privileges

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-71.png)

Entering the administrative password

## Installing Docker Desktop on macOS with a Disk Image

If you prefer to install Docker on macOS with a disk image (DMG file), this section is for you. Installing Docker via a disk image is a little different depending on the type of processor you have (Intel or Apple). Where applicable, the tutorial will provide a callout where necessary to differentiate.

> _You can find the processor by running the [About This Mac application](https://support.apple.com/en-us/HT201581)._

To install Docker Desktop with a disk image, open a terminal and let’s get started.

**_1\. Apple processors only_**: Install [Rosetta](https://support.apple.com/en-us/HT211861). Rosetta is an application that emulates various Intel processor behaviors to allow applications built for Intel processors (like Docker) to run on Macs with Apple processors.

```bash
#Install Rosetta 2
softwareupdate --install-rosetta
```

2\. Open a web browser and navigate the [Docker Desktop for Mac](https://docs.docker.com/desktop/install/mac-install/) install page. Click the button corresponding to the type of processor your Mac has.

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-72-1024x293.png)

Downloading Docker Desktop for Mac

3\. When downloaded, click the disk image file to run the Docker Desktop installer. A menu screen will open with the Docker Desktop app and the Applications folder on your Mac. Click and drag the Docker Desktop icon into the Applications folder to complete the install.

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-73.png)

Adding the Docker.app to the Applications folder

4\. Run the Docker application. You’ll see the same security prompts as steps three and four from the previous section. Click through those screens and you’re done!

## Configuring Docker for Mac

Now that Docker is successfully installed on your Mac, it is time to configure some basic options for Docker Desktop. The Docker Desktop Dashboard is the central location for all Docker containers and applications running in your Docker instance.

Open Docker Desktop and click the gear icon in the top right of the Dashboard to get to the Preferences screen.

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-74-1024x581.png)

Opening the Settings dialog of Docker Desktop for Mac

In the **Preferences** screen, you’ll have various sections containing items to customize the behavior of Docker. Some notable settings follow.

### System Resources

Select the **Resources** menu heading and click on **ADVANCED**. The **Advanced** section contains the configuration for the hardware resources used by Docker Desktop.

Using the sliders, you can adjust the hardware resources available to Docker Desktop.

*   **CPUs** – The number of processors available to Docker Desktop. The default setting is half of the maximum number on your Mac. Raising this number will increase container and application performance.
*   **Memory** – The amount of memory available to Docker Desktop. By default, this value is set to 2 GB.
*   **Swap** – The [swap file size](https://docs.docker.com/config/containers/resource_constraints/) for Docker Desktop. The default is 1 GB and can be increased or decreased based on container and application requirements.
*   **Disk Image Size** – The local disk space available to Docker Desktop.
*   **Disk Image Location** – The file system location for the Docker Desktop disk image.

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-75-1024x581.png)

Adjusting Resources in Docker Desktop

### File Sharing

Select **FILE SHARING** under the **Resources** —> **ADVANCED** menu heading. The locations listed are the folders shared between the local file system on your Mac and any running [Docker](https://adamtheautomator.com/docker-cp/) containers and applications.

Related:[How to Copy Files with Docker cp to your Docker Container](https://adamtheautomator.com/docker-cp/)

To add a location:

1\. Click the plus icon in the bottom right of the **FILE SHARING** screen.

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-76-1024x581.png)

Adjusting File Sharing for Docker Desktop

2\. Choose the folder you’d like to share with Docker Desktop and click **Open**.

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-77.png)

Adding a folder to share

3\. Click the **Apply & Restart button** to apply the changes.

![](https://adamtheautomator.com/wp-content/uploads/2021/09/image-78.png)

Applying the changes and restarting Docker Desktop

> _Note that sharing too many folders with Docker can lead to decreased system performance._

## Conclusion

Setting up Docker on your Mac is the first step on your journey towards learning a container infrastructure model. Docker on your Mac will give you a place to explore and test running containers and applications in Docker.

What containers will you set up in your new Docker Mac environment?

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fdocker-for-mac%2F&text=Docker%20for%20Mac%20%3A%20The%20Complete%20Installation%20Guide)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fdocker-for-mac%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fdocker-for-mac%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2026/02/featured_image-13.webp)

### [Azure Container Apps: Instant Preview Environments per PR](/build-ephemeral-preview-environments-every-pr/)

Build isolated preview environments for every pull request using Azure Container Apps revision labels and Azure DevOps pipelines with scale-to-zero economics.

![](https://adamtheautomator.com/wp-content/uploads/2025/11/55418e927e511ae263219c072e27d637c2a967a5036de7020b329582db775c26.png)

### [Automating Docker Container Health Checks with Python and Local Notifications](/docker-health-checks-python/)

Docker's built-in health checks are passive—they tell Docker when a container fails, but do they tell you? In this tutorial, we'll build a lightweight Python monitoring system that runs entirely on your infrastructure with zero external dependencies. You'll learn to detect container failures in real-time, send instant alerts, and maintain a complete audit log of every state change.

![](https://adamtheautomator.com/wp-content/uploads/2023/07/gitea-docker.jpg)

### [Gitea Docker: Your Ultimate Self-Hosted Git Solution](/gitea-docker/)

Learn how to install a Gitea Docker instance and self-host Git repositories securely in this ATA Learning tutorial!

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
