---
title: Docker on Mac – a lightweight option with Multipass
description: Run Docker on Mac with Multipass, a lightweight option to manager virtual
  machines with ease.
url: https://canonical.com/blog/docker-on-mac-a-lightweight-option-with-multipass?format=md
---

1. [Blog](https://canonical.com/blog)
2. Article

---

[Nathan Hart](https://canonical.com/blog/author/nhart "More about Nathan Hart")

15 August 2023

# Docker on Mac – a lightweight option with Multipass

[Multipass](https://canonical.com/blog/tag/multipass)
[Virtualisation](https://canonical.com/blog/tag/virtualisation)

---

Share the article

For those looking for a streamlined, lightweight command line interface for Docker on Mac, look no further. Multipass is a flexible tool that makes it easy to create and run Ubuntu VMs on any platform, and it comes with built-in tools that make running applications like Docker feel native on platforms such as macOS.

## What is Multipass?

[Multipass](http://multipass.run) is a command line tool that makes managing virtual machines a breeze. From giving you an Ubuntu shell in as little as less than 20 seconds, to creating local miniclouds for test and dev work, it has your Linux needs covered.

## Why Run Docker in Multipass?

Multipass is designed to be lightweight, flexible, and efficient. It can run in the background unnoticed, available whenever you might need it.

Multipass has deep host integration, which is a game changer for an application like Docker. You can mount local files with a single command, giving you access to dockerfiles and source code kept in macOS. What’s more, you can alias Linux commands to the host machine, and make them context sensitive in that space. This becomes particularly useful for docker-compose.

Let’s say you have a docker-compose.yml file sitting on your host machine and you need a quick way to test it out. With Multipass, you can run `docker-compose up` directly from your host machine’s terminal, without ever needing to launch an application or shell into a virtual machine.

Multipass runs Docker inside a VM in the same way that other tools such as Docker Desktop do. Multipass, however, gives you control over that VM and any others you might need. Let’s say you need multiple instances of Docker with different configurations applied to each – you can do that with Multipass. Or perhaps you need a few different flavors of Kubernetes and associated applications to run in other VMs on the same local or external network – you can do that with Multipass too.

## Docker on Mac with Multipass

If you haven’t yet, [install Multipass](https://multipass.run/install) either via the installer or with [brew](https://multipass.run/docs/installing-on-macos).

Getting Docker running on Mac with Multipass takes just one command:

```
`multipass launch docker`
```

This creates a virtual machine with the latest Ubuntu LTS with Docker preinstalled. It also mounts a workspace, a shared file space between the host and the virtual machine so you can easily transfer data or source code between the two. Of course, if you have an existing folder you want to share, you can mount that after the fact, or modify the above command to something like this:

```
`multipass launch docker --mount=/path/to/my/folder`
```

These commands also create aliases for several docker commands: `docker` and `docker-compose`. To use them, you can either prefix them with `multipass`, or you can add the aliases to your path by following the instructions in the output of the above commands (typically something like `XXXX`).

Now, to create a container or run a docker-compose file, just run the command as if you had docker installed natively.

For example:

```
`docker build -t my-mac-container .` or `docker-compose up`
```

You should now be up and running with Docker.

## Further reading

To learn more about how this works in Multipass, read up on [Blueprints](https://multipass.run/docs/use-a-blueprint) or create your own. Leave us a note in [Discourse](https://discourse.ubuntu.com/c/multipass/21) if you have a cool project you want to share or if you’ve got feedback.

## Sign up for our newsletter

Get the latest Canonical news and updates in your inbox.

Work email:

\*I agree to receive information about Canonical's
products and services.

By submitting this form, I confirm that I have read and agree to [Canonical's Privacy Policy](https://canonical.com/legal/dataprivacy).

Sign up

## Share on

---

## Related posts

[### Unleash new ways of working with flexible, cost-effective VDI](https://canonical.com/blog/unleash-new-ways-of-working-with-flexible-cost-effective-vdi)

Empower your modern workforce with VDI from HPE, Canonical, and HP Anyware For years, virtual desktop infrastructure (VDI) has helped power the most complex IT environments—and...

[Gokhan Cetinkaya](https://canonical.com/blog/author/gokhancetinkaya)

28 October 2024

[### Data centre networking: What is OVN?](https://canonical.com/blog/data-centre-networking-what-is-ovn)

Providing an overview of Open Virtual Network (OVN), its architecture and the main drivers behind it in the data centre networking space.

[Benjamin Ryzman](https://canonical.com/blog/author/benjaminryzman)

24 September 2024

[### Faster AI application development with Canonical and NVIDIA AI Enterprise](https://canonical.com/blog/ubuntu-kvm-supports-nvidia-ai-enterprise)

Ubuntu KVM support comes to NVIDIA AI Enterprise Canonical continues to expand its collaboration with NVIDIA by providing Ubuntu KVM Hypervisor support with NVIDIA AI...

[Canonical](https://canonical.com/blog/author/canonical)

12 September 2023

[### What is a hypervisor? A beginner’s guide](https://canonical.com/blog/hypervisor)

In the realm of virtualisation and cloud computing, the hypervisor is a critical component that enables the seamless operation of multiple virtual machines (VMs) on a single...

[Tytus Kurek](https://canonical.com/blog/author/tkurek)

21 August 2023
