How-To: Docker on Windows and Mac with Multipass | Ubuntu

Share
  • Post Updated: April 3, 2024

If you’re looking for an alternative to Docker Desktop or to integrate Docker into your Multipass workflow, this how-to is for you. 

Multipass can host a docker engine inside an Ubuntu VM in a manner similar to Docker Desktop. That Docker instance can be controlled either directly from the VM, or remotely from the host machine with no additional software required. This allows you to run Docker locally on your Windows or Mac machine directly from your host terminal.

Summary

In this tutorial, we will run the Docker Hello World container within a Multipass VM, from the host command line. To do so, we will:

  • Install Multipass (if not already installed)
  • Use cloud-init to:
    • Create a Multipass VM
    • Install docker engine on the VM
  • Alias the docker command to the host command line
  • Run the Docker Hello World container from the host terminal

Preparation

First, install Multipass by heading to multipass.run and following the installation instructions there for your operating system.

Windows

We will…

Source link