4 ms·
Add: run a docker container without an entire VM.
by smackeyacky 5y ago
Add: run a docker container without an entire VM.
- WesolyKubeczek 5y agoYes, this is a big one. I run full system containers on my Linux boxen with systemd-nspawn, and on macOS, with their system level protections, I suspect even chroots would be too much to ask. (Maybe it's possible, I just haven't had that many disposable hours to check just how much pain it would be for quite a while.)
- AlexSW 5y agoNot sure whether you know something I don't but I'm not aware of any VM when I'm running Docker containers directly on my Mac?
- dpatterbee 5y agoYou might not be aware, but docker desktop is running a linux VM under the hood.
- idontwantthis 5y agoDocker machine uses qemu to make a Linux VM to run docker containers in.
- silviot 5y agoAnd then does magic when you want to expose a volume from your macos host to your docker container. And that magic can slow down things. They improved things recently though [1] [1] https://www.docker.com/blog/speed-boost-achievement-unlocked-on-docker-desktop-4-6-for-mac/ https://www.docker.com/blog/speed-boost-achievement-unlocked...
- smackeyacky 5y agoOSX is a distant third for a developer who is deploying docker containers. Microsoft and WSL2 are trying, but nothing beats a linux distribution for that.
- deadbunny 5y agoIsn't WSL2 just a VM as well?
- smackeyacky 5y agoYes, but the integration with the host OS on windows is better, especially if you are using vscode. Not as good as native linux though.
- School-Cotton 5y agoTry running a docker container whose executable is called “foo” in macOS. Then go to activity monitor and try to find “foo”, or try to attach to it from the host with lldb, or try to profile it with the Xcode profiling tools. You can’t. This is because it’s running in a VM, not natively on the host. On Linux you can do any of those things from the host directly, without needing to shell into the container. I actually found this so incredibly frustrating when I started working at a job that uses docker that I argued in vain against using docker at all, and then when that failed, I switched to doing all my coding and other technical work on a Linux VM and only using macOS for email.
- martimarkov 5y agoDocker is built against Linux not unix so not much can be done there. On windows you also need a VM AFAIR
- jml78 5y agoWhile not wrong, certainly not the fault of Apple. This is a docker shortcoming.
- lixtra 5y agoWhat’s the docker equivalent in Apple world to run something in a container?
- pjmlp 5y agoIn the Apple world, people don't care about containers other than application sandboxes.
- GekkePrutser 5y agoThat is true, but containers are the most pervasive in macOS of all desktop OSes. That is something I do actually like there. And Apple isn't even forcing developers to do it (unless they want to publish in the app store which most apps I use don't do), just more and more app developers sandbox themselves.
- pjmlp 5y agomacOS/iOS sandboxes and Docker containers aren't the same thing, not even from technology point of view.
- bsdooby 5y agobhyve/xhyve
- smackeyacky 5y agoWell, BSD might be the shortcoming here.
- zuhsetaqi 5y agoThat's like saying "Things Linux can't do Mac can: Run macOS without a VM"
- kiallmacinnes 5y agoWhile technically, yes, you are correct. It kinda misses the point - developers are more and more working with containers. Doing this on a Mac is an awful experience compared to doing it on Linux (or, Windows - I hear docker + WSL2 is pretty decent - but I've not tried it!)
- zuhsetaqi 5y agoI understand the point and totally agree, but in my opinion it doesn't fit to this kind of list in the article which is about features of the OS that don't work on macOS but on Linux. "Linux can't ran Adobe Creative Cloud Apps natively which a lot of designers use" would also not fit this kind of list.
- smackeyacky 5y agoWhy not? Its a perfectly valid criticism of linux and a good reason to choose OSX if you need adobe. As a developer who needs docker, OSX is not the best choice. If I was a designer, OSX is a better choice.
- zuhsetaqi 5y agoWhile it's a good reason to choose macOS or Windwos over Linux it's not a valid criticism of Linux because they can't do anything about it. It would be valid criticism of Adobe. Like I said the list of the posted article is about OS features and explicitly not about third party software