3 ms·
It's a great idea. But on non-native Docker, like OSX, it's simply too slow. Even when it's acceptable speeds, I find my computer running at 100% CPU usage with
by silviogutierrez 6y ago
It's a great idea. But on non-native Docker, like OSX, it's simply too slow. Even when it's acceptable speeds, I find my computer running at 100% CPU usage with the fan out of control.
Nix is a similar idea and makes the environmental identical for all developers. Makes on-boarding trivial. And speeds are "native" on all platform.
As a nice side effect: it normalizes all tools like sed, grep and find.
With that said, as a consumer of a Nix setup, it's about as easy if not an easier experience than using Docker[1].
But properly learning to create your own Nix packages, etc, involves a very, very steep learning curve. Far higher than learning the basics of a Dockerfile.
[1] Catalina issues notwithstanding, though there is a 4 command solution now: https://github.com/NixOS/nix/issues/2925 https://github.com/NixOS/nix/issues/2925
- zapita 6y agoAnecdotically, I develop inside a container using Docker for Mac, and don't have any performance issues. I think it depends on what exactlty you're developing, in particular filesystem access patterns.
- silviogutierrez 6y agoDefinitely comes down to file access, above all.
- zokier 6y agoBut you don't really get "identical" without running VM; with your setup the software still runs on Darwin which is pretty different from Linux
- CraftThatBlock 6y agoDocker on macOS runs inside a Linux VM, so yes it's functionally identical. The performance issues arise from FS mostly due to macOS (see post at top of front-page earlier)
- bdcravens 6y agoYou can mitigate MacOS Docker issues using docker-sync, and if it's an application with a lot of file churn while it runs, it may make sense to add to paths to your .dockerignore
- wahern 6y agoVMs can provide native performance. Docker sucks because Docker sucks. MacOS' Hypervisor.framework doesn't help, either. Linux' VM hosting subsystem, KVM, as well as its VM guest drivers, support all the features needed for zero-overhead VM environments out-of-the-box, including PCI passthrough if you want completely native disk and network I/O. The problem with containers as a performance and behavior testing environment is that everything is using the same kernel. Kernel behavior is a significant factor, and sometimes a huge factor, in the performance of various applications.