# Multipass Docker Setup This repo provides a config and instructions for getting `multipass` setup to create an Ubuntu image with docker & docker-compose for use on macOS. - [Download multipass](https://multipass.run/docs/installing-on-macos) - Update the included `cloud-init.yaml` file with your ssh key (`cat ~/.ssh/id_rsa.pub | pbcopy` should get it on your clipboard) - Create the multipass image with `multipass launch --cloud-init cloud-init.yaml --name docker` - You might need to upgrade the default settings to include more RAM/HDD space. - Feel free to change the `--name` argument to whatever you'd like to call this. - Validate correct initialization with `multipass exec docker -- docker -v && docker-compose -v` - Run whatever you want within the image: `multipass shell docker`. You can also just call `multipass shell` since this is the default image ## VSCode Use You can use this image with VSCode Remote to program using docker inside of the image. - Find the IP of the running image with `multipass list`. You're looking for something like `192.168.64.X` - Add this as a remote in the VSCode Remote extension - You will want to mount your project directory into the image with `multipass mount`. If you're in a project folder, you could do something like ```multipass mount . docker:/project/```. This is the folder you'll want to open using VSCode Remote --- **Helpful docs:** - [Multipass docs](https://multipass.run/docs) - [cloud-init examples & docs](https://cloudinit.readthedocs.io/en/latest/topics/examples.html) **Helpful blogs:** - https://aaronmsft.com/posts/multipass/ - https://www.freshblurbs.com/blog/2020/04/19/Multipass-Docker-Mac-Cassandra.html