Live data from Hacker News

Docker on MacOS is slow and how to fix it

paolomainardi.com

161–170 of 211 posts

Re: Docker on MacOS is slow and how to fix it

#161
post #80

Earlier quoted context omitted.

> There's a litany of bugs in Apple's software. Personally, the only problems I've only ever had getting macos to sleep properly has been when I've been running VMs. (Hello docker!) When doing purely OS-local development (which is all I ever do these days, because I value my sanity) macos works great. (So long as you have a recent mac. New macos + old laptop is awful.) But as nice as macos is, XCode is an absolute me…

Again, the reason it seems great to you is because developers have papered over so many bugs and other deficiencies. Linux has its own issues but it overall is at a completely different quality level from macOS.

Linux's bugs are just in a different place. Macos's bugs are all deep technical problems that Apple doesn't have enough senior engineers to bother fixing. (Eg the FS watch APIs). Or weird bloaty preinstalled processes that eat up all your CPU when nothing is happening on your computer. Or... anything that the light of XCode touches.

Linux's bugs are things like the fact that every program has a slightly different set of keyboard shortcuts. Is copy Ctrl+C? Or Shift+Ctrl+C? Can I make it Meta+C (like on macos)? Not everywhere! Only some linux applications let you treat the meta- key as a modifier. (Eg intellij doesn't let you do that.)

Smooth scrolling (if you have hardware to support it) works in all native GTK applications. But not Firefox or IntelliJ. Normal mouse scrolling works everywhere, but scroll distance is wildly inconsistent between applications.

On macos I have homebrew. On linux I have apt. And snaps. And flatpak. But I think we're at war with snaps? I'm lost.

My bluetooth keyboard and mouse are both broken on linux. I'm not sure if the problem is my bluetooth chipset driver, or if the devices both have terrible implementations of bluetooth and they didn't bother testing on linux. Either way, I bet they both work fine on macos.

> Linux has its own issues but it overall is at a completely different quality level from macOS.

Its different alright. But its certainly not uniformly better.

Re: Docker on MacOS is slow and how to fix it

#162
I stopped using Docker desktop and just forwarded my Docker CLI to a VM’s TCP port the instant I found how it exported my Mac file system wholesale to the Docker VM. Never looked back, and these days I just use sshfs or VSCode to develop remotely (which works everywhere).

Re: Docker on MacOS is slow and how to fix it

#163

Earlier quoted context omitted.

It's also our employers. They don't like to spend money on dev tools because the suits don't see the benefit. There's no glossy Gartner magic quadrant BS for every niche development usecase so they think they're throwing money into the fire.

> glossy Gartner magic quadrant BS The phrase is gold. I understand from this that companies which provide tools and infrastructure for professional developers must not only attract the devs themselves, but also (and maybe more importantly) market/advertise and sell to the "suits", their managers and employers. Not sure if that's what you intended, but I'm now seeing the value of glossy Gartner magic quadrant BS, and…

I am calling it that because I often see solutions being marked at the top that are actually worst in capability. I don't understand how they make these quadrants but I guess money has a lot more to do with it than technical capabilities.

Re: Docker on MacOS is slow and how to fix it

#164
post #33

Often overlooked: there is also podman machine and podman desktop (for windows and macOS). It is not as fancy as docker, but fully free and open source. It provides docker compatibility to some extent, you don’t need a license and it’s much less heavy than docker desktop. If you need kubernetes, there is also minikube, which provides a lot of options. Most of the things discussed in this article still apply for podma…

Podman has been a massive disappointment for me. I stupidly gave up my docker desktop because the company was trying to make cost savings and it was supposedly a drop-in replacement.

Some short-lived containers like our repo’s linter takes easily 4x as long to run in podman as it did with Docker. Immediately I have lost productivity.

It’s incredibly unreliable, every time I start my computer I have to podman machine stop then podman machine start because there’s something broken about how it gets initialised at startup. I’ve spent ages debugging random broken functionality.

It doesn’t support docker-compose. There’s a community project called podman-compose, but it’s not great because it won’t do stuff like build containers concurrently, and it has random weird quirks about volumes already existing when you do podman-compose up —-build whereas docker doesn’t complain for the same compose file.

Overall podman has been a massive regret for me, and I wish I hadn’t given up my docker desktop just to save a minuscule amount of money.

Re: Docker on MacOS is slow and how to fix it

#165

What sort of workloads are people doing where the filesystem access is limiting them? I develop python web apps on a mac and use dockerized postgres and a dockerized flask app. I don't seem to experience any noticeable issues. When I am developing I mount the source code directory as a volume so code edits are synced live into the running docker container. I also develop frontends using vue, managed by npm. In my exp…

My company has a large python repo. Anyone that develops in this repo on a Mac is considered a sadist because…

Running Pylint on a Linux machine in docker: 3 hours from no cache

Running Pylint on a Mac in docker: 9+ hours from no cache unless VirtioFS is used, which makes it closer to 4 hours.

Re: Docker on MacOS is slow and how to fix it

#166
post #109
post #86

Earlier quoted context omitted.

It cost money sounds like the big one

Even after building and selling developer tools for a decade, it always surprises and enrages me to see how miserly developers are.

Anything but a FOSS license makes my life as an employed software engineer harder if I don't want to completely disregard compliance rules. So usually I don't bother.

Also, some developer tools want outrageous prices that are in no way proportionate to their value if you compare them to some standard paid tool (i.e. a JetBrains IDE)

Re: Docker on MacOS is slow and how to fix it

#167
post #109

Earlier quoted context omitted.

Even after building and selling developer tools for a decade, it always surprises and enrages me to see how miserly developers are.

It's also our employers. They don't like to spend money on dev tools because the suits don't see the benefit. There's no glossy Gartner magic quadrant BS for every niche development usecase so they think they're throwing money into the fire.

Also, there are some tools where you could convince someone up the chain to spend money, until they see the offer from the vendor.

I would have loved to have HashiCorp Vault Enterprise for instance, but the math just wasn't working out to get a feature you can get by... just running more of them.

Re: Docker on MacOS is slow and how to fix it

#168

Earlier quoted context omitted.

Apple laptops definitely have issues sleeping. https://forums.macrumors.com/threads/macbook-air-m1-doesnt-s... There's a litany of bugs in Apple's software. This often gets hidden because developers use workarounds of various sorts, but if you know, you know. It's honestly embarrassing how buggy Apple software is given the vertical integration you describe. The worst part is that almost all of it is closed source so…

> The worst part is that […] The actual worst part is that it is impossible to draw a meaningful conclusion from a problem report like this one: > Mine also shines from the holes when closed. M1 Air. Noticed happens when browser is open and i closed the lid . Yeah, it shines from the holes. Also develops a halo. Sometimes two. Maybe three, dunno. Sometimes the laptop can see stars. Yes, it can be indeed an OS related…

I mean its the same reason most corporate Windows laptops suck also - not sure why Apple gets a free pass but Windows cops it when similar issues only happen on corporate devices loaded with junk.

Re: Docker on MacOS is slow and how to fix it

#169
post #33

Often overlooked: there is also podman machine and podman desktop (for windows and macOS). It is not as fancy as docker, but fully free and open source. It provides docker compatibility to some extent, you don’t need a license and it’s much less heavy than docker desktop. If you need kubernetes, there is also minikube, which provides a lot of options. Most of the things discussed in this article still apply for podma…

Podman has been a massive disappointment for me. I stupidly gave up my docker desktop because the company was trying to make cost savings and it was supposedly a drop-in replacement. Some short-lived containers like our repo’s linter takes easily 4x as long to run in podman as it did with Docker. Immediately I have lost productivity. It’s incredibly unreliable, every time I start my computer I have to podman machine…

I haven’t used it much I have to admit. But I also experienced the issues you are talking about.

I thought it was because I also have docker desktop on the same machine, but probably that’s not an issue at all and it’s podman remote that is unreliable.

Re: Docker on MacOS is slow and how to fix it

#170
post #60

Funny that this came up — shameless plug: I've actually been working on a new Linux+Docker+Kubernetes solution for macOS recently! Already added quite a few improvements over existing apps including Docker Desktop, Rancher, Colima, etc: - Fast networking: 30 Gbps! vs. 150 Mbps with Docker VPNKit. Full VPN compatibility, IPv6, ping, ICMP and UDP traceroute, and half-open TCP connections. - Bidirectional filesystem sha…

Blog post author here, cannot wait to see the solution out in the wild, it will be open-source ? Can you let me try it ?
Post reply on HN