Zach Grammon


Developer / Teacher
Share: 

Replace Docker Desktop with Multipass

Multipass is a multi-platform tool used to set up and run Ubuntu VMs on your local machine, while using some of the cloud scripting functionality.

1. Install Multipass

2. Review the docker workflow

We will be using the docker workflow, a cloud-init yaml file

3. Launch a new instance using the docker workflow

Here we are creating a new Ubuntu VM using the docker workflow. By passing only docker, we are specifying to use the workflow. We could also use a generic Ubuntu VM by omitting docker. Also, add a custom name with -n my-custom-name

multipass launch docker -c 4 -m 12G -d 100G

Note: we’ve assigned 4 cpu cores, 12gb of memory, and 100gb of disk space. Adjust accordingly.

4. View Logs

If your launch fails, you may need to look over the logs to figure out what happened.

5. Access docker instance

The instance should be availabe now, so we can load it up and try things out.

6. Set up Portainer

This is a browser-based docker admin tool, also handy for monitoring container resource usage and performance.

7. Set aliases

This step is the secret sauce, and it lets you type docker or docker compose on your local machine and run it in the VM.

8. Mount projects in Multipass

9. Optional: Set up Docker in VS Code

, ,