Live data from Hacker News

Docker on MacOS is slow and how to fix it

paolomainardi.com

11–20 of 211 posts

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

#11

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?

the 'DOCKER_HOST' variable (and the fact that all SDK's seem to support it) is honestly the greatest bloody thing in the entire ecosystem.

My workflow for the past 3 years with Docker has been: set up some desktop machine somewhere, configure docker, configure ssh like normal: set DOCKER_HOST=ssh:// on my laptop.

Docker responds as if it's local, but I get absurd build/fetch speedup (since the wired connection is faster than Wifi) and it's not running inside a slow VM.

Recently I've been using colima on my Mac natively, but I keep reaching for the DOCKER_HOST option.

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

#12

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…

nginx is pretty unusable via docker - I guess file system cache is the issue…

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

#13

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…

Workloads with a lot of files, for example a large elixir web app with hot reload / fswatch enabled, have upwards of 20 second page load time. More than enough to mess up my flow.

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

#14

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…

Magento in docker on Mac is horrible for this reason.

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

#15

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…

I work on a _large_ C++ codebase on Linux. If I'm on my main (Linux) machine, things are fine, bind mounts are okay. If I'm stuck on my MacBook then compilation performance is...bad. I suspect it's due to heavy filesystem access from the compiler (reading source, writing object files, etc). At some point I need to confirm this by copying in my source directory.

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

#16

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…

[dead]

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

#17
post #12

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…

nginx is pretty unusable via docker - I guess file system cache is the issue…

You can turn caching off, I believe.

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

#20

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 assumes you want a distinct storage drive within your VM.

Many developers prefer to code in their host OS but run the image via Docker for Mac. They also want instant real-time code changes to appear inside the running Docker image. I suppose you could have some of the disk live within the VM and the code portions be memory mapped or Rsynced. I haven’t thought through the downsides.

Post reply on HN