What you need before you start

Docker on Mac runs inside a lightweight virtual machine because Docker's core engine is built for Linux. Apple's built-in virtualization handles this automatically — you do not need to set up a separate Linux system yourself. What you do need is a Mac running macOS 11 (Big Sur) or newer, at least 4 GB of RAM available (though 8 GB is more comfortable), and about 3 GB of disk space for Docker itself.

You have two main installation routes: Docker Desktop, which is the official graphical application from Docker, or Colima, which is a lighter-weight alternative that runs Docker in the background without a separate app window. Docker Desktop is simpler for most people. Colima is worth considering if you want to save RAM or prefer command-line tools.

Key Takeaways

  • Docker Desktop is the official Mac application and handles all the virtualization setup automatically — download it from docker.com, drag it to Applications, and launch it.
  • Apple Silicon Macs (M1, M2, M3) and Intel Macs use the same Docker Desktop installer, but Apple Silicon versions run native ARM containers by default.
  • After installation, open Terminal and run docker run hello-world to confirm Docker is working.
  • Docker Desktop runs a background virtual machine that uses RAM and disk space even when you are not actively using containers — you can adjust these limits in Docker's settings.
  • Colima is a lighter alternative that uses less RAM if you prefer command-line setup and do not need the graphical interface.

Installing Docker Desktop on Mac

Go to docker.com, click the Download button, and choose the installer for your Mac's processor type. If you have an Apple Silicon Mac (M1, M2, M3, or newer), download the Apple Silicon version. If you have an Intel Mac, download the Intel version. The file is about 500 MB and downloads as a .dmg disk image.

Once the download finishes, open the .dmg file from your Downloads folder. A window appears showing the Docker icon and an Applications folder. Drag the Docker icon into the Applications folder. This copies Docker to your Mac's main applications directory. The copy process takes a minute or two.

Open Applications (you can press Command-Shift-A in Finder to jump there), find Docker.app, and double-click it to launch Docker for the first time. A window appears asking for your Mac password — Docker needs this to install a small helper tool that manages the virtual machine. Enter your password and click Install Helper.

Docker now starts its background virtual machine. You will see a spinning Docker icon in the menu bar at the top right of your screen. Wait until the icon stops spinning and the menu shows "Docker Desktop is running" — this usually takes 30 seconds to 2 minutes. You are now ready to use Docker.

Verifying Docker works

Open Terminal (press Command-Space, type Terminal, and press Enter). Type this command and press Enter:

docker run hello-world

Docker downloads a small test image and runs it. If everything is working, you see output that includes "Hello from Docker!" followed by an explanation of what just happened. This confirms that Docker can download images, create containers, and run them — the three core operations.

If you see an error like "command not found", Docker did not finish starting up yet. Wait another minute and try again. If you see a permission error, your Mac password entry did not complete properly — quit Docker from the menu bar, launch it again, and re-enter your password when prompted.

Adjusting Docker's resource limits

Docker Desktop runs a virtual machine in the background that reserves RAM and disk space. By default, it uses up to 2 GB of RAM and 64 GB of disk space, but you can change these limits if you want Docker to use less or more.

Click the Docker icon in the menu bar (top right), select Preferences, and go to the Resources tab. You can adjust CPU cores, memory, and disk image size. If you are running other applications that need RAM, lowering Docker's limit frees up space. If you are working with large container images, increasing the disk limit prevents "out of space" errors. Changes take effect after you restart Docker.

You can also see how much space your downloaded images and containers are actually using. In Preferences, go to the Troubleshoot tab and scroll to Disk usage. This shows you which images are taking up the most space and lets you delete unused ones.

Using Docker from the command line

Most Docker work happens in Terminal. A few commands you will use constantly: docker ps lists running containers, docker images lists downloaded images, and docker pull imagename downloads a new image without running it yet.

When you run docker run, Docker creates a new container from an image, starts it, and shows you its output. For example, docker run -it ubuntu bash downloads Ubuntu, starts a container, and gives you a bash shell inside it. Type exit to stop the container and return to your Mac's Terminal.

Containers are temporary by default — when you exit, the container stops and is deleted. If you want to keep a container around, use the --name flag: docker run --name mycontainer -it ubuntu bash. Later, you can restart it with docker start -i mycontainer.

Colima: A lighter alternative

If Docker Desktop feels heavy or you prefer not to have a separate app window, Colima is a command-line alternative that runs Docker in a background virtual machine. It uses less RAM than Docker Desktop and is free and open-source.

Install Colima using Homebrew (a Mac package manager). Open Terminal and run brew install colima. Then start it with colima start. Colima downloads and starts a Linux virtual machine, and Docker commands work exactly the same way as with Docker Desktop.

The trade-off is that Colima has no graphical interface — you manage everything from Terminal. There is no settings window to adjust resources; instead, you edit a configuration file. For most people, Docker Desktop is simpler. Colima is worth trying if you are comfortable with the command line and want to save RAM.

Troubleshooting common problems

If Docker commands hang or time out, the virtual machine may not have started properly. Click the Docker icon in the menu bar and select Restart. Wait for the spinning icon to stop, then try your command again.

If you see "permission denied" errors when running Docker commands, your user account may not have permission to access the Docker socket. Run sudo usermod -aG docker $USER in Terminal, then log out and log back in. This adds your user to the docker group so you do not need sudo for every command.

If Docker uses too much disk space, images and stopped containers accumulate over time. Run docker system prune to delete unused images, containers, and networks. Add the -a flag to delete all unused images, not just dangling ones: docker system prune -a.

Frequently Asked Questions

Do I need to know Linux to use Docker on Mac?

No. Docker abstracts away most Linux details. You interact with containers through Docker commands, which work the same way on Mac, Windows, and Linux. If you want to explore inside a running container, basic Linux commands help, but you can learn those as you go.

Can I run both Docker Desktop and Colima at the same time?

No. Both try to manage the Docker daemon, and they will conflict. Pick one and stick with it. If you want to switch, quit the one you are using, uninstall it, and install the other.

Why does Docker Desktop keep running in the background?

Docker Desktop runs a virtual machine that stays active so containers can start instantly when you need them. If you want to save RAM, quit Docker from the menu bar when you are done working. Restart it when you need it again.

What is the difference between Intel and Apple Silicon versions?

Apple Silicon Macs run the ARM version of Docker natively, which is slightly faster. Intel Macs run the x86 version. The Docker commands you type are identical — the difference is under the hood. If you accidentally download the wrong version, Docker will not start; just download the correct one and try again.

Can I use Docker to run Windows containers on my Mac?

No. Docker on Mac runs Linux containers only. Windows containers require Windows or a Windows virtual machine. If you need to test Windows-specific software, you would need Docker Desktop on Windows or a separate Windows VM.