Since the Docker app for macOS is not free to use anymore for companies, I looked into running "bare" docker-machine. This runs the "Docker engine" (?) in a Linux VirtualBox VM, managed by docker-machine.
- VirtualBox
- Homebrew
- If installed, update your packages with
brew update
&brew upgrade
- Or install via Homebrew
- If installed, update your packages with
- No Docker.app (remove Docker.app from
~/Applications
) - No
~/.docker
folder
brew install docker docker-machine docker-compose
docker-machine create —driver=virtualbox default
- If that fails, open macOS system /Security & Privacy/
- Unlock if neccessary
- Press allow /Oracle VM VirtualBox Manager/ system extension
- Reboot
- Remove VM named
default
from Vm VirtualBox Mamager - Remove
~/.docker
folder - Repeat step 2
- Profit?
- Docker Machine Overview | Docker Documentation
- Docker can’t connect to docker daemon - Stack Overflow
- Applications can't access docker network out-of-the-box so a custom setup is required.
- Port forwarding is not straight forward.
- Application configs (database.yml and redis URLs) may require changes to support both Docker.app and VirtualBox setup
- Incompatible with M1 machines
- Or more precisely, requires Docker Daemon API 1.40 or lower which does not support the
platform: linux/x86_64
key/value in docker-compose
- Or more precisely, requires Docker Daemon API 1.40 or lower which does not support the