Live data from Hacker News

Docker on MacOS is slow and how to fix it

paolomainardi.com

41–50 of 211 posts

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

#41
post #19

Earlier quoted context omitted.

My preferred fix: don't develop in Mac.

For many Mac is the only sensible option. There's one developer in our company that uses Linux and it's a lot of pain to setup. Mac has the best balance between coding, utility tools and "other work stuff". Windows probably on par if not more for "work stuff" but falls badly in the coding & tooling department. Linux is OK ish for coding and utility but falls behind for "other work stuff" and certainly a pain to just…

> everyone in the development & support team uses Mac (except this one guy who insisted in Linux),

> certainly a pain to just keep it updated.

> Linux and it's a lot of pain to setup.

If you're not using Linux, how are you justifying these claims?

> certainly a pain to just keep it updated.

Excluding the boot time for both, MacOS takes between 15 and 45min to update. Linux is a few seconds. I suspect that the only OS that has a more ridiculous update process than MacOS is Gentoo.

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

#42
Docker is cripplingly slow on MacOS. I have a maxed out 16" mbp... starting rspec on our app takes 55-60 seconds. Compare that to my coworkers on Linux and Windows, who both see sub 10 second boots, and it's absolutely impossible to be ok with those numbers.

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

#43

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…

One issue I ran into at my previous employer was pylint on a large Python codebase. Pylint is slow on the best of days, but the difference on an M1 Mac running under docker (to standardize the version and settings across the team) was something like 10x as slow; several *minutes* to lint the codebase, which we absolutely required before code could be checked in. It finally got a lot better when VirtioFS came out, whi…

Are you linting the whole codebase, or just files changed in the commit?

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

#45
post #40
post #37

Earlier quoted context omitted.

There's also Rancher Desktop. I don't know if it's less heavy, but it doesn't require a license and also includes k8s. https://rancherdesktop.io/

I didn’t try it out yet. But usually thing from rancher are awesome.

Last time I tried it, it was using sshfs mounts. Way slower than whatever Docker Desktop is using. Looks like sshfs is now unmaintained, I can't find what they're using now.

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

#46
post #41

Earlier quoted context omitted.

For many Mac is the only sensible option. There's one developer in our company that uses Linux and it's a lot of pain to setup. Mac has the best balance between coding, utility tools and "other work stuff". Windows probably on par if not more for "work stuff" but falls badly in the coding & tooling department. Linux is OK ish for coding and utility but falls behind for "other work stuff" and certainly a pain to just…

> everyone in the development & support team uses Mac (except this one guy who insisted in Linux), > certainly a pain to just keep it updated. > Linux and it's a lot of pain to setup. If you're not using Linux, how are you justifying these claims? > certainly a pain to just keep it updated. Excluding the boot time for both, MacOS takes between 15 and 45min to update. Linux is a few seconds. I suspect that the only OS…

One can be using something that isn’t Linux for development and still be familiar with it. Perhaps they did in the past? Perhaps working in the same team as someone exposes them to the alleged headaches?

This is a thread on Hacker News, not an academic article. You aren’t owed a massive amount of “justification” for these “claims”.

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

#47
post #42

Docker is cripplingly slow on MacOS. I have a maxed out 16" mbp... starting rspec on our app takes 55-60 seconds. Compare that to my coworkers on Linux and Windows, who both see sub 10 second boots, and it's absolutely impossible to be ok with those numbers.

this is very true. not to mention it's very slow on its networking... i've given up docker on macOS long ago. If I was to use docker, I'll switch to my debian laptop. way much much faster.

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

#48
post #19

My preferred fix: don't develop in Docker.

My preferred fix: don't develop in Mac.

this is hard. what if you're on project with

- backend (docker) - needs linux based machine - client app (iOS) - needs xcode on macOS

both are in one repository.

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

#49

Is not this the main way to speed up Docker on Mac: use a beefed up Linux Virtual Machine (VirtualBox, UTM, tart) and run Docker inside this Virtual Machine?

This doesn’t address the root problem. If you want the FS features that the “””native””” Docker Desktop provides, you end up with the same drawbacks re performance.

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

#50

My preferred fix: don't develop in Docker.

Have fun managing osx and Linux dependencies then when you could just maintain one.

If you're not IT, god speed y'all, then it's not all that bad honestly. I set up my stuff with Ansible and 90% of the "porting" work was the mapping between rpms and brew packages.

The only headache I get sometimes is because I have the GNU utils first in the path which makes compilation scripts mad sometimes.

Post reply on HN