Run docker on Mac OS using alpine VM run by lima.
Guest OS (and docker as result) is always x86_64. Yes, even on M1.
brew install docker lima
cd ~/src
git clone https://github.com/levsha/docker-on-lima.git
ln -s $(pwd)/docker-on-lima/docker-on-lima ~/bin/
docker-on-lima start
docker ...
- It takes about a minute for the provision script to install and start dockerd. Therefore
docker
returnsCannot connect to the Docker daemon ...
right after start. - Volume binds are read-only by default. You have to change "~" to be writable (and re-create VM:
docker-on-lima stop; docker-on-lima rm; docker-on-lima start
). DO THIS ON YOUR RISK! - kind does not work on alpine.
- Running on M1 is slow by design as it runs non-native architecture.