Docker Desktop Free Alternatives for Mac and Windows
There are different reasons why people can't use Docker Desktop. It might be restricted by company policies or because it requires you to pay at some point in time (most likely the latter one).
Don't get me wrong, I'm not against paying for products and services, but sometimes you don't make the decision on whether to pay or not.
People using Linux are fine. However, it is not that easy for people using Mac and Windows to drop Docker Desktop. That's exactly the situation where I found myself recently. This article will show you what alternatives you might use to keep working with Docker on Mac and Windows without using Docker Desktop.
Docker Desktop is more than just UI
First, I want to address a common misconception.
Even if you're not using UI, you might very well be using Docker Desktop. You see, the desktop bundle is more than just UI, and you start using it from the moment you accept the license agreement.
The catch is that without accepting the agreement, you won't be able to work with Docker at all. You still have CLI, which comes with the desktop bundle, but to make things work, you have to have the Docker daemon running.
If you try to run any command that somehow interacts with the daemon, you'll get the following error.
Cannot connect to the Docker daemon at unix://path/top/docker/socket.
Is the Docker daemon running?
If you are running Docker containers without installing any extra tools and don't see such an error, it means you've accepted the service agreement. You're using Docker Desktop, even if you're not touching the UI.
How does Docker Desktop work
Before diving into Docker Desktop alternatives, let's first understand what Docker Desktop is and how it works.
On the official Docker website, you can find every piece of software that comes with the desktop bundle.
In this article, we'll mostly focus on Docker Engine.
Docker Engine is the heart of Docker. It keeps the system up and running. The engine consists of 3 pieces:
A long-running daemon process called
dockerd
API that other programs can use to interact with programs running in
dockerd
A command line interface (CLI) called
docker
Notice that Docker Engine only supports particular Linux distributions. But how does it work on Mac and Windows then?
To make things work, Docker Desktop creates a virtual machine (VM) on your Mac or Windows machine. This VM is running a Linux distribution that Docker Engine supports. Inside this VM, Docker Engine runs the dockerd
daemon.
It is important to understand the part on how things get running with Docker Desktop because all the alternatives that we're about to look at are doing exactly the same.
They all create a VM and run things inside this VM. It is the universal approach to make Docker work on unsupported Linux distributions or non-Linux systems.
Now that you have some idea of how Docker Desktop works behind the scene, we can move forward to its alternatives.
Colima for Mac
The first alternative on the list is Colima. It is a minimalistic container runtime for Mac and Linux. To install Colima on your Mac, run the following brew command.
brew install colima
To start running Colima, use the start command.
colima start
This command creates a Linux VM and makes it possible to run the dockerd
daemon. The default configuration of the VM is as following:
Disk space 60GB
CPU 2
Memory 2
If you want to change any of these, pass a dedicated option with the number that suites your needs.
colima start --disk 100 --cpu 4 --memory 6
This command creates a machine with 100GB of disk space, 4 CPU cores, and 6GB of RAM.
It was the hardest part. Now, you only need to install the Docker CLI and Docker credentials helper packages using brew.
brew install docker docker-credentials-helper
Now you're ready to go.
Podman for Mac and Windows
Podman is developed by Red Hat and the open source community.
Podman is different from Colima:
It works across all major operating systems: Windows, Mac, Linux
It is not only about containers. It goes beyond and provides a way to work with Kubernetes
Podman itself implements the Open Container Initiative (OCI)
At the same time, Podman is similar to Colima in terms of how it makes things work. When running Podman on Windows or Mac, it creates VM that allows it to run dockerd
inside.
If you like to work with GUI (I personally do), then you can install a dedicated desktop client. It is super convenient to create VM using it.
Since it implements OPC itself, is it possible to use it with Docker? The answer is sound yes. Podman is listening to Docker API clients supporting direct usage of Docker-based tools.
Overall, Podman looks like a solid alternative to Docker. It is backed by the big company and an open-source community. It has a dedicated desktop client that is easy to work with. It implements OPC, which makes it possible to ignore Docker completely and move to Podman.
Conclusion
Some people think that if they are not using the UI provided by the desktop app, they are not using Docker Desktop, but this is far from true. The moment you accept the license agreement, you're using the desktop application.
There might be different reasons why you can't use Docker Desktop, but it doesn't mean you have no options. There are great tools that can replace Docker Desktop without any problems and make your experience with Docker seamless.
For Mac users, Colima is one option. It is lightweight, easy to install, and impressively easy to manage.
For Mac and Windows users, Podman is another great option. It is not only compatible with Docker and its API, but unlike Colima, it also provides a dedicated desktop client with GUI where you can manage images, containers, and everything that comes with it.
Subscribe to my newsletter
Read articles from Pavel Romanov directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Pavel Romanov
Pavel Romanov
Software Engineer. Focused on Node.js and JavaScript. Here to share my learnings and to learn something new.