2 ms·
Let's say you run: docker run -it ubuntu:22.04 bash , then roughly this happens: There's a Linux VM hosted on your mac. There's a docker daemon running on your
by dboreham 4y ago
Let's say you run: docker run -it ubuntu:22.04 bash , then roughly this happens:
There's a Linux VM hosted on your mac. There's a docker daemon running on your mac. The docker command process above communicates with said daemon which has the ability to exec processes inside the Linux VM. It uses that capability to exec runc (or something similar) which in turn starts a bash process inside a namespace inside the VM.
If you run some other container the same thing happens, using the same VM.
So the secret is : docker isn't running anything on your mac, it's running stuff on a Linux VM hosted on your mac.