Install with Multipass
Many people have issues building and running Docker images with the new Apple Silicon (M1/2). Fortunately, Ubuntu has come to the rescue by providing their own virtualization tool that is compatible with Apple Silicon, Multipass.
Here is how you set up Multipass and build your Docker containers. If you’d like to see the original documentation used to create this material, you can go to Replacing Docker Desktop on Windows and Mac with Multipass.
This is specific to Mac, for Windows, go to the above link.
We will be using Homebrew to accomplish this, go to Homebrew Installation.
-
Install Multipass with:
brew install --cask multipass
-
Create a Virtual Machine to run your Docker Builds:
multipass launch --cloud-init - --disk 40G --mem 4G --cpus 4 --name magnolia-code-server-vm <<EOF
groups:
- docker
snap:
commands:
- [install, docker]
runcmd:
- adduser ubuntu docker
EOF
Depending on your needs, you may want to modify the --disk and --cpus to meet your needs.
|
-
Make your working directory (the root of this project, for example) available to the Virtual Machine:
multipass mount /PATH-ON-YOUR-LOCAL-SYSTEM/magnolia-code-server docker-vm:/home/ubuntu/magnolia-code-server
Once your machine is built and ready to go, you can now use the Multipass icon in the upper right-side of your screen to Open a shell to your machine.
Go to your machine and click "Open Shell":
Once the shell is open, you can navigate to your repo, for example:
cd magnolia-code-server/servers