How to run Minikube on Apple M1 chip without Docker Desktop
Tags: docker, architecture, kubernetes, devops
Published: 2022-07-29 19:23:51

This article was originally posted on [Everything DevOps](https://everythingdevops.dev/how-to-run-minikube-on-apple-m1-chip-without-docker-desktop/).

Docker Desktop failed me, and at the time (13th July 2022) of writing this article, Hyperkit, VirtualBox, and other hypervisors specified [here](https://minikube.sigs.k8s.io/docs/drivers/#macos) don’t work on the Apple M1 chip.

Weeks ago, while using Docker Desktop, it suddenly got stuck in a [start-stop loop](https://github.com/docker/for-mac/issues/6136). I spent hours trying to resolve it, combed through GitHub issues and stackoverflow, and even downloaded older versions of Docker Desktop but to no avail. 

I then started searching for an alternative to Docker Desktop. And oh, did I see so many! But though they were alternatives, most didn’t work seamlessly on the M1 chip until I found [Colima](https://github.com/abiosoft/colima). 

This article will teach you how to run minikube on an Apple M1 chip without Docker Desktop using Colima.

# Prerequisite

To follow along with this article, you should have:

- minikube installed on your machine. Learn how to [here](https://minikube.sigs.k8s.io/docs/start/).
- Docker Desktop uninstalled. It’s important to note that [Colima from v0.3.0 upwards can run alongside Docker Desktop](https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#can-it-run-alongside-docker-for-mac).
# How to run Minikube without Docker Desktop

With your current M1 minikube installation, if you run just `$ minikube start`, it will fail (see image below). And this is because minikube needs a container or virtual machine manager to run, which ideally, Docker desktop (VM + container), hyperKit, etc., would provide.


![](https://paper-attachments.dropbox.com/s_7F7C928FEC07EA9A8FBDE94A8532BF5E2DB48835C58511FEFCE62BB92F0E2EAB_1657712368095_Screenshot+2022-07-13+at+12.39.22.png)


But since you are having issues or don’t want to use Docker Desktop and can’t use other hypervisors on the M1 chip. You can replace Docker Desktop with Colima reducing the process to run minikube to `$ colima start` and then `$ minikube start`.

## What is Colima?

[Colima](https://github.com/abiosoft/colima) is an open-source project that provides container runtimes on macOS with minimal setup. The name Colima means containers in [Lima](https://github.com/lima-vm/lima) — Linux virtual machines on macOS. 

Aside from the minimal setup, Colima offers the following:

- Simple CLI interface
- Docker and Containerd support
- Port Forwarding
- Volume mounts
- Kubernetes

As this article is to run minikube, you will use Colima with Docker runtime without enabling its Kubernetes feature.

## Installing Colima to run Docker containers on macOS

As minikube (with Docker driver) will create a docker container, you must install Docker’s CLI alongside Colima.

**Installing Colima** 
The fastest way to install Colima is through Homebrew. There are other installation options; check [here](https://github.com/abiosoft/colima/blob/main/docs/INSTALL.md) to see them.


    $ brew install colima

To check your installation, run:


    $ colima

And ensure you get a help message similar to the image below:

![](https://paper-attachments.dropbox.com/s_7F7C928FEC07EA9A8FBDE94A8532BF5E2DB48835C58511FEFCE62BB92F0E2EAB_1657674560779_Screenshot+2022-07-13+at+02.09.17.png)


**Installing Docker’s CLI**
After Colima installs, install Docker and Docker Compose.


    $ brew install docker docker-compose

After the above installation, configure `docker-compose` as a Docker plugin so you can use the `docker compose` command instead of the legacy `docker-compose` script. To do that, first create a folder in your home directory to hold Docker CLI plugins:


    $ mkdir -p ~/.docker/cli-plugins

Then symlink `docker-compose` into that folder with:


    $ ln -sfn $(brew --prefix)/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose

And to test, run:


    $ docker compose

Then ensure you get an output similar to the image below. 

![](https://paper-attachments.dropbox.com/s_7F7C928FEC07EA9A8FBDE94A8532BF5E2DB48835C58511FEFCE62BB92F0E2EAB_1657672102650_Screenshot+2022-07-13+at+01.28.18.png)


Now that you have Colima installed on your machine, you will create a virtual machine instance with Colima. minikube will use the VM instance, which provides the Docker runtime to start.

## Creating a virtual machine instance with Colima 

To create a virtual machine with Colima, run:


    $ colima start

The above command will create a VM with the default configuration of 2 CPUs, 2GiB memory, and 60GiB storage which should be enough for moderate use. But if you’d like, you can customize your VM by passing additional flags such as `--cpu`, `--memory`, `--disk`, etc., to `colima start`. Or by editing the config file with `colima start --edit`. To learn more, check [here](https://github.com/abiosoft/colima#customizing-the-vm).

After you run the start command, you will see the following output as Colima downloads the image required the create the VM and then boots the VM:

![](https://paper-attachments.dropbox.com/s_7F7C928FEC07EA9A8FBDE94A8532BF5E2DB48835C58511FEFCE62BB92F0E2EAB_1657714544776_Screenshot+2022-07-13+at+13.14.57.png)


Once the download and boot process finishes, you will see an output showing that Colima is ready for use.

![](https://paper-attachments.dropbox.com/s_7F7C928FEC07EA9A8FBDE94A8532BF5E2DB48835C58511FEFCE62BB92F0E2EAB_1657714707501_Screenshot+2022-07-13+at+13.18.23.png)


To confirm, you can run `$ colima list` or `$ colima status` to see the Colima running and with the default Docker  runtime which minikube will use to start. 

![](https://paper-attachments.dropbox.com/s_7F7C928FEC07EA9A8FBDE94A8532BF5E2DB48835C58511FEFCE62BB92F0E2EAB_1657714980901_annotely_image+34.png)


Now with Colima running, you can efficiently run minikube without specifying any driver. 

## Starting minikube

With Colima running, run the `$ minikube start` command to create your minikube cluster.

![](https://paper-attachments.dropbox.com/s_7F7C928FEC07EA9A8FBDE94A8532BF5E2DB48835C58511FEFCE62BB92F0E2EAB_1657715610709_Screenshot+2022-07-13+at+13.31.50.png)


Now, run `$ docker ps`. You will see the minikube container running on your machine with the image created on the first `$ minikube start`.

![](https://paper-attachments.dropbox.com/s_7F7C928FEC07EA9A8FBDE94A8532BF5E2DB48835C58511FEFCE62BB92F0E2EAB_1657717330087_Screenshot+2022-07-13+at+14.02.04.png)

## Conclusion 

This article taught you how to run minikube on an Apple silicon without Docker Desktop and other hypervisors using Colima. Colima is a great tool and has made my life easier since I started using the Apple M1 chip. To learn more about Colima, see [answers to some frequently asked questions](https://github.com/abiosoft/colima/blob/main/docs/FAQ.md).