News for hackers. Stuff that matters.
Re:More developers use Linux than Mac, according to 2022 Sta... by jkmcf on Wednesday December 28, 2022 @02:19PM (#34164694)
Just one data point, but I can't say I've had any development problems with Docker on MacOS. It's frustratingly slow, but it has always worked. Perhaps you are doing stuff way more complicated than just running a few containers.
Re:More developers use Linux than Mac, according to 2022 Sta... by geerlingguy on Wednesday December 28, 2022 @02:23PM (#34164750)
For individual containers or smaller local deployments using internal Docker networking, it's usually stable and you can use hacks like NFS reverse mounts for faster shared files.

But I've run into issues emulating more complex environments where you need multiple exposed ports, more complex host-to-Docker networking, etc., which generally works on Linux because it's not stuck in a VM shim layer.

But most of the time, I don't have any issues, just sometimes slower environments on Mac if I don't tune folder mounts and run apps like Ruby/Node/PHP with hundreds or thousands of files.

Re:More developers use Linux than Mac, according to 2022 Sta... by tzs on Wednesday December 28, 2022 @03:48PM (#34165768)
You can use Wireguard to tunnel from the internal Docker networking to Mac's network, so that each Docker container can have a separate IP address that is visible to Mac processes.

Here's a description of my setup for that: https://news.ycombinator.com/item?id=33665178

Re:More developers use Linux than Mac, according to 2022 Sta... by stusmall on Wednesday December 28, 2022 @03:53PM (#34165813)
I think this touches on what might have been the heart of the issue of one of my projects. It made use of extremely, complex dynamic docker networking. Both inter-container and host networking. It was a beast
Re:More developers use Linux than Mac, according to 2022 Sta... by beebmam on Wednesday December 28, 2022 @02:44PM (#34165006)
The problem is that the Docker runtime doesn't actually run on MacOS. It runs on a Linux VM running alongside MacOS. This can make a few things complex enough that requires changes to applications which interface with docker, especially related to networking. It's the same with Docker on Windows (running Linux containers. Windows containers are a whole other issue)
Re:More developers use Linux than Mac, according to 2022 Sta... by jolux on Wednesday December 28, 2022 @02:54PM (#34165100)
> It's the same with Docker on Windows

And the same with Docker Desktop on Linux: https://docs.docker.com/desktop/install/linux-install/

Re:More developers use Linux than Mac, according to 2022 Sta... by pxc on Wednesday December 28, 2022 @03:09PM (#34165286)
This strikes me as such an obviously stupid, self-defeating design that I have to be missing something.

Why would the Docker developers do this? Did doing it locally not work well? Is all that just to 'spare' Linux developers from actually installing Docker on their machines?

Re:More developers use Linux than Mac, according to 2022 Sta... by yamtaddle on Wednesday December 28, 2022 @03:39PM (#34165639)
The trouble with Linux is that anything you don't vendor in will be a giant fucking headache when it comes to support. But then, so will anything you do vendor in, as soon as some shared lib your vendored-in dep relies on is at the wrong version, or when it encounters some oddball config/package combo, or whatever.

Here they appear to have chosen to vendor in the whole damn OS, which, given the realities of supporting Linux, doesn't seem totally insane to me. I'd expect it also lets you run it with reduced permissions (not everyone has root on their workstation) and to generally make cross-distro operation much more reliable and consistent.

Re:More developers use Linux than Mac, according to 2022 Sta... by sdf4j on Wednesday December 28, 2022 @03:37PM (#34165618)
Maybe you want to run a completely different kernel, or distro, from your prod environment.