Because Docker Desktop is taking a lot of resource from my Mac.
The follwing steps have been tested on my Intel Macbook w/ 16gb ram.
You will needs to remove Docker Desktop before started this tutorial.
Multipass is a cli tools that can let you create and running Ubuntu VM in a minutes.
Require Homebrew installed
brew install multipass docker
multipass version multipass 1.7.0+mac multipassd 1.7.0+mac
First, create a VM config file
users: - name: ubuntu sudo: ALL=(ALL) NOPASSWD:ALL ssh-authorized-keys: - your-ssh-public-key package_uplang: zh-TW date: true packages: - docker - avahi-daemon - apt-transport-https - ca-certificates - curl - gnupg - lsb-release runcmd: - sudo curl -fsSL https://get.docker.com | sudo bash - sudo systemctl enable docker - sudo systemctl enable -s HUP ssh - sudo groupadd docker - sudo usermod -aG docker ubuntu
Then run this command to create a Ubuntu VM
multipass launch -c 2 -m 1G -d 5G -n docker 20.10 --cloud-init docker.yaml
This will take a few mins to build and start. Once it's done you can see what is running with
SSH into docker VM
Makesure you accepted VM to save you SSH key, this is required for docker to auto connect to remote docker engian.
Also check is docker installed on VM by running
Add this to your
~/.zprofile to always use this
Check docker info