5 ms·
Somewhat unrelated but do we still need Docker Desktop for Mac to run Docker containers on macOS? Why is that, is it because Linux is needed? Couldn't Docker ru
by ohwel2l 6y ago
Somewhat unrelated but do we still need Docker Desktop for Mac to run Docker containers on macOS? Why is that, is it because Linux is needed? Couldn't Docker run containers natively using just macOS?
- ressetera 6y agoI don't have a clear image of how Docker behaves on Mac, but I had wasted a whole day trying to make it work on Windows WSL. I'd suggest you virtualize a normal Linux host on your machine (under VMware for example) and run Docker there.
- jedieaston 6y agoWSL2 makes this super easy. Once you have a distro installed, you just go into Docker Desktop's settings, click "use WSL2 backend" and it does it. Then you don't have to have Docker's slow boot2docker VM eating RAM all the time in the background. It's great! The reason it doesn't work on WSL1 is because of the whole Linux kernel not being there, the features required for Docker to work don't exist. But since WSL2 is a (rather performant for certain tasks) VM, it works fine.
- noisem4ker 6y agoI'm almost certain you already read this guide [1], so I ask: where did it fail you? It definitely wasn't straightforward, but I managed to get it working fine in a couple of hours (Windows 10 1903, WSL 1, Ubuntu 16.04). [1] https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly https://nickjanetakis.com/blog/setting-up-docker-for-windows...
- ressetera 6y agoIf I'm not mistaken, I hadn't many issues installing docker on WSL. The problems started when I docker-compose up'd a pretty basic nginx-php-mariadb stack.
- Tsarbomb 6y agoThe capabilities of Docker and similar technologies all stem from LXC which depends on the capabilities of the Linux kernel.
- moondev 6y agoYou need Linux to run Linux containers
- _jal 6y agoDocker uses namespaces, cgroups and other facilities that are Linux-specific. (Other OSes implement similar things, but of course they're different implementations.) A short description, a bit old, but still useful: https://jvns.ca/blog/2016/10/10/what-even-is-a-container/ https://jvns.ca/blog/2016/10/10/what-even-is-a-container/
- jeremyjh 6y agoI'm sure you could make a native containers ecosystem for MacOS, but Docker containers contain software which is written for and compiled on Linux, and they need a Linux kernel to run. Docker containers do not provide a kernel - it uses the host. It is literally no different than taking any binary compiled on Linux or Windows and asking why it won't run on MacOS. So even if Docker supported a native container system on MacOS, it would be useless because no Linux Docker images could run on it.