
We'll add another -H parameter to also listen on network interfaces ( -H tcp://0.0.0.0). The -H fd:// bit tells the daemon to listen on local sockets only. Still in the VM, we'll edit the daemon's service configuration file: > sudo nano /lib/systemd/system/rviceĪround line 12 you'll see something like this: ExecStart =/usr/bin/dockerd -H fd:// -containerd=/run/containerd/containerd.sock We need to change its configuration to make it available on the bridged network between the VM and your host machine, so that commands run on the host will contact the daemon on the VM.

By default, the daemon only listens to requests from the VM itself. The daemon is installed as a system service, so it will auto-start with the VM. Once that is set up (the first time will take some time), access the VM and install the Docker daemon (in the examples below, the > prefix indicates that the command is being run in the VM): multipass shell my-docker multipass launch 20.04 -name my-docker -d 50G -m 2G You can download multipass and run the installer or, if you use Homebrew, this will work too: brew install -cask multipassĬreate a new VM to run the Docker daemon I'm calling it my-docker - be creative with your naming! 😅 Note that I'm allocating a disk of up to 50GB and 2GB memory. We'll use the Multipass tool from Canonical, which allows running Ubuntu VMs with ease. We need to replace the virtual machine (VM) provided by Docker Desktop with our own. It should give out an error about not being able to connect to the Docker daemon. To make sure it is stopped, in Terminal try the command: docker ps

Below is a quick solution that I assembled from some documentation and miscellaneous Reddit posts, in order to run Docker on macOS.įirst, stop Docker Desktop if it's running (the little Docker logo on the notification area).

It is a very convenient way to run Docker on Windows and Mac, but it is in no way the only one. However, there is nothing forcing the use of Docker Desktop.

Their licensing tiers are actually very sensible and I absolutely recommend that if you are using their software professionally, you should get a suitable license. That's all good - it's their product and they can obviously license it whichever way they want. Docker has announced that Docker Desktop is now subject to licensing.
