Completely free amd64 docker on Mac
Update 2022-12-13: It’s even eaiser now: just install and use colima:
brew install colima
colima start # optionally with --arch x86_64
docker run -it alpine # or whatever else you want
You are probably aware that Docker Desktop changed their license. Yes, there are high chances you can still use it for free. But maybe not.
When you use M1 Mac then Docker Desktop runs arm64 VM. This is fast, but might be not very convenient.
It is surprisingly easy to have completely free fully functional docker on Mac using lima.
And to make it trivial I’ve made docker-on-lima helper script.
The script always runs amd64 version of Alpine Linux. It means that you always have amd64 docker, even on M1:
# uname -a
Darwin air.levsha.me 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 arm64
# docker run -it alpine uname -a
Linux 4a44d7e46010 5.10.61-0-virt #1-Alpine SMP Mon, 30 Aug 2021 07:41:25 UTC x86_64 Linux
#
That’s it!