Consider adding the 'delegated' flag to boost docker perf. on macOS
See original GitHub issueIs your feature request related to a problem? Please describe. Building project using docker on macOS is notoriously slow, after some googling, I found that there’s some ways to boost the performance of this process.
I post the link to the posts I read in here just in case someone want some reference Performance tuning docker for mac(from community blog) Performance tuning for volume mounts (shared filesystems)(official doc)
Here’s the link to performance comparison Docker on Mac Performance: Docker Machine vs Docker for Mac
Here’s the GitHub issue related to the subject Pertinent Issue
In a nutshell, building project with docker on mac is unbearably slow, so, I use delegated
flag when run docker,
here’s the screenshot on how I modified my docker-compose.yaml to make the build process from almost forever to just a few second: (I still modify a section but there’s no enough space to include that to the screenshot, anyway, you can tell from the preview pane on the upper right😅)
Describe the solution you’d like So, I suggest include this change to yaml file in the project, or(see next)
Describe alternatives you’ve considered Add an extra notice to the contribution doc, letting those who use mac be aware this issue and let them know how to alleviate the pain.
PS: I’m also happy to help with this issue😆
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
@raisedadead Hey, man, thanks for the advice and sorry for not keeping the update or work on it for several days, I’m currently dealing with some life emergency, and magically, the only thing that can let me feel less painful or pain-free is immerse myself in the world of coding😂 how crazy!
Anyway, I just opened a PR and hopefully that can help a lot of people using mac and try to build the project from docker~
PS: I kind of favor adding a note on the guide to remind those with mac to do the
delegated
flag thing when they build the project, because slow building only happen on mac I think, although this could lead to problems like forgot to remove the flag in the file when they commit so they push to the remote and cause a lot of conflicts…Anyway, adding this flag while building on PC or Linux shouldn’t cause any problem I think, because
delegated
means the change between host and container is not in sync immediately… hmm… sounds like a problem… but for more on it I think you should consult the docker doc I posted above😅Lets start by adding the flag like you have tested. We could merge the PR and keep it under observation for a few days. We could add a warning or remove/overhaul the docker setup if the flags break something, later.