Run Docker on mac use multipass

Docker desktop costs so much to run

Install

multipass

1brew install --cask multipass
2# specific resource, default cpu 1, default disk 5G
3multipass launch --name linux -d 10G -m 4
4# shortcut, alias make command easy
5alias m=multipass
6m launch linux

Here i use homebrew. You can download directly multipass release

Now you are in linux env, you login by ubuntu with sudo permission

1sudo apt install docker docker.io
2#or you prefer containerd
3sudo apt install containerd crictl

Use Docker command to manage your container You can mount your local path into instance

1# pwd $HOME
2m mount -u 501:1000 $HOME/Public linux01:/tmp/public
3# pay attention on the policy of you mount dir