by stusmall · 3y ago · 0 comments
Aside from build and stability issues, I've also hit not-so-subtle bugs in MITM proxies they add for connections on some ports.
I get why building Docker on MacOS, especially with the x86 emulation twist, is such a difficult problem. I don't envy the engineers working on this. But I don't get a developer who knows they need Docker would pick a mac for their main machine.
I'd change this to "web" development. There are a lot of us not doing anything that requires even thinking about docker.
I'm not alone in picking the word "fundamental". In the same survey that is article is based on, Docker was the #1 "other tool" for professional devs. SO had this to say about it: "Last year we saw Git as a fundamental tool to being a developer. This year it appears that Docker is becoming a similar fundamental tool for Professional Developers, increasing from 55% to 69%." I think the comparison works too. Git isn't the best tool for everyone, but is extremely common and a sound default. Docker also isn't the best tool for everyone, but isn't far off on being as ubiquitous.
Just do a 'colima start' once a month when I actually have to reboot my mac, to boot up the background VM, and everything else basically runs as normal.
It's too complex to thunk windows calls to linux, that is what WSL1 tried and failed at, because windows is just too different from a POSIX paradigm for that to work well. But posix-on-posix isn't really all that hard... nor is other *nix-on*nix.
What did they do differently with WSL2+?
Eh, yes it is. Apple doesn't provide a containerisation API for their OS, which means Docker is forced to run non-natively!
Containers on macOS don't use OCI images or anything like that, but scoped and grouped access to system resources with a separate user land that 'looks' like a full OS has been available for over 5 years. Even without that, XNU has plenty of facilities for it, and even if it didn't you'd still be able to use Launchd environments (which are more akin to LXC).
Docker relies on specific implementation details of the Linux kernel. It always has. That is why you always need a Linux OS somewhere to run the containers.
With that said if you're doing mostly backend stuff in Go/Python/Ruby etc it's quite good. Most of my complaints are from full-stack development.
Lots to do to combat this, like: not sharing the volume with the host (vscode dev containers recommends this)
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.
Here's a description of my setup for that: https://news.ycombinator.com/item?id=33665178
And the same with Docker Desktop on Linux: https://docs.docker.com/desktop/install/linux-install/
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?
It was working fine for me, maybe requiring one restart per month. But the slowness was unbearable anymore. Don't even get me started on the effects of it on battery life.
To anyone looking for a replacement, Windows is usable. I still miss the consistency of MacOS tho.
Since I only use laptops, I haven't even bothered to try Linux again, my last experience was not that great with compatibility issues and hibernation problems.
This includes multiple editors and IDEs used, multiple languages and multiple frameworks, also multiple types of development (from common devops facilities development to front-end simulation, on-prem and cloud, C#, Python, Java, Go, Rust, Swift, Objective-C, C++, TypeScript, Scala, T-SQL, PL/SQL (yep, RDBMS with on-DB applications), some on plain docker, some on Podman some on local Kubernetes clusters, all using wired and wireless connections (or both), one or more VPN connections), and nobody is having any issues with macOS and Docker on Intel or ARM. The only non-ARM OS we have around is Windows because we can't legally get it. Everything else is multi-arch, except for some legacy Oracle and IBM applications that are being phased out and have been handed off to a third party to maintain while we rip them out.
We have the luxury of not really doing and foreign architecture compilation because you can develop locally and CI will do matrix builds so we can run on a mixed spot fleet on AWS. We used to build for POWER8 too (before we handed off the IBM nonsense). Some people do it anyway, especially those who want to test binary protocols (a very small percentage) when they write applications that do IT<-->OT communication and want to make sure that the architecture on the IT side doesn't mess up binary payloads that the OT side won't know what to do with. This is usually done with k3s and skaffold where we attach and 2nd node to a Rancher Desktop instance that runs pure x86 instead of x86-in-ARM via Rosetta. We also have 1 Linux user who does this, but she's just using plain qemu emulation for ARM-on-x86 (instead of the other way around on M1/M2 Macs).
So all in all, I think the problem is still valid, but your experience is not really representative it seems. Keep in mind that happy people tend to not go on the internet and tell everyone about all the problems they don't have ;-) So most reports we'll see will be from people having issues with something.
The biggest issue we used to have was the AUFS support, but even that was mostly a painpoint for those who could not auto build from the ide or didn't have things like Jib. That has been resolved for over 5 years tho.
This is surprising. I run FreeBSD on a home server but I would imagine that it'd be rather unproductive to run as a web dev workstation OS, since it shares friction points with macOS (mainly, it's not Linux) but doesn't have even a fraction as many users which means you're basically on your own for fixing any issues that crop up.
More power to this individual if they're making it work though. It's great to see diversity in the desktop/workstation OS usage… in my view, desktop monoculture will only come back to bite us in the ass.
I also think that monoculture isn't really the best way, but neither is an abundance of variations causing uncertainty. We need to be able to plan ahead and look ahead, and have enough of a standard to operate.
Luckily, convincing stakeholders that "but we imaged this workstation last year" isn't a valid argument in any scenario (security, productivity, DLP) wasn't all that hard, and the jump from there to "images and MDM are all fun, but near realtime posture verification is the only way" was made with relative ease.
Most people still stick to the "supported and automated" provisioned workstations, but those who want something else can have it, if they deliver on their compliance, non-friction and actual work. Best of all worlds.
Meanwhile, the client works just fine and can connect to a headless machine running Linux if you don't want the cost of virtualizing the host OS. Like, if my Linux laptop were having trouble running a Mac copy of Photoshop in a Mac VM (ignore the legality) and it was really important for work and that was getting in my way, I'd... get a Mac. If Docker on Mac isn't cutting it, get a Linux box—it's not Mac-native software and you can still interact with it pretty seamlessly from the Mac.
I use the Remote SSH plugin in VSCode and configured the VM to forward all container ports to localhost (as well as forward port 22 to port 2222 on localhost). I also have `alias vmlogin=ssh -X -p 2222 localhost` in my .zsh_profile and set up ssh to use a public/private key pair for quick logins.
I remember playing around with running our codebase through Docker when M1 first got released and it was really slow (due to ARM and/or shared disk read speeds?). But from what I understood it was something that was to be fixed soon...
I'd love to use Docker at work but it was a show stopper.
On Linux, I quite like Podman! It has a couple of gaps, but for simple things it works great
I have nothing but horrible memories when I had to use Linux on the desktop.
MacBook Pro (14-inch, 2021)
Chip Apple M1 Pro
Memory 16 GB
macOS Monterey
Docker 20.10.17
I agree it was awful on the previous generations tho.
Stop trying to get me to switch to MacOS :-P
> It's such a fundamental tool to development
s/fundamental/gratuitous, undesirable/ . IMNSHO.
brew install podman-desktop
https://podman-desktop.io is a full (free) docker replacement supported by redhat.