DevTurtle logo DevTurtle

How to install Docker for free on Mac?

If you have already read our article that explains what Docker is and how it is an indispensable tool for speeding up the development and distribution of applications, then now you are ready to install it and start using it! In this article we will see how to install Docker on Mac and how to use it completely free of charge.

Docker is an open source project but is usually distributed together with some desktop interfaces that make it easier to use and more user-friendly. Some of these solutions are free while others are paid. You must therefore carefully evaluate which one to choose based on the use you want to make (business or for personal purposes).

Docker Desktop

Browsing the web you will surely have come across the official Docker website where you can download the Docker Desktop version. It is available in both the Apple chip version and the Intel chip version and installation is really very simple and intuitive.

Docker Desktop is by far the best choice if you plan to use Docker for training purposes or personal projects as you can use it for free. If you instead need to use Docker for work reasons, then you need to purchase the licenses (which are not excessively expensive anyway). In the latter situation it might be convenient to adopt one of the alternative solutions that we will describe later.

Docker Desktop
Docker Desktop

The interface is very simple and has everything a developer could need. There are dedicated tabs for managing:

  • Container
  • Docker images
  • Volumes

Thanks to the Docker Scout functionality it is also possible to monitor the dependencies of your applications to identify any security vulnerabilities. Finally, it is possible to add numerous extensions by choosing them in the marketplace.

Once Docker Desktop is started, the Docker Engine will also start automatically so you can also start using the classic CLI (terminal) commands. The solution also includes the possibility of using Kubernetes.

Rancher Desktop

The second solution that I would recommend is Rancher Desktop. This time it is a completely free version regardless of the type of use so it can also be adopted by companies that do not want to incur licensing costs.

The tool is very similar to the previous one and has a very intuitive GUI that allows you to manage both containers and images in a “smart” way. Furthermore, Rancher Desktop also includes Kubernetes in addition to the Docker Engine.

Rancher Desktop
Rancher Desktop

There are some very particular cases in which some applications require advanced virtualization features to run on Apple processors (belonging to the ARM family). These applications may not be supported on Rancher Desktop and therefore alternative solutions such as the one presented below must be adopted.

Homebrew Docker + Colima

If you are looking for a lightweight solution and are not interested in the features offered by the graphical interface, you can install Docker in the traditional way via Homebrew:

brew install docker

To use Docker on Mac devices with Apple processors, Colima must also be installed. We have already mentioned this minimal runtime in our article which explained how to start Oracle XE on Docker precisely because it allows you to solve compatibility problems with the ARM processor architecture (also used by Apple).

Installing Colima is very simple and can be done via Brew with the following command:

brew install colima

Once installed it can be started with:

colima start --memory 4 --arch x86_64

As you may have understood, there are various solutions available for installing Docker on Mac but each of these has advantages and disadvantages. You must therefore choose the best path based on your situation.