13 ms·
Over the past week I went through all the motions of setting up docker for mac with docker-compose for a local ruby/rails development environment. I was excited
by evbots 9y ago
Over the past week I went through all the motions of setting up docker for mac with docker-compose for a local ruby/rails development environment. I was excited about the prospect of using containers to silo my app and all it's system dependencies, and also make it easier to onboard new developers. My setup had 3 containers. One for app, elasticsearch, and postgres. Unfortunately I have to go back to running my app directly on the system. I am leaving elasticsearch and postgres containerized, however.
The docker for mac setup is seriously bottlenecked by slow volume read/write performance. There is an ongoing discussion here on the issue: https://github.com/docker/for-mac/issues/77 https://github.com/docker/for-mac/issues/77. Even after adding the new :cached option to my volume declaration in docker-compose yml file, performance was a huge issue.
My app leverages babel, as I write some react components in ES6 and transpile them to ship to the client. Right now transpilation after changing any javascript code results in a minute + of transpilation time as docker for mac has yet to solve the performance problem. This resulted in a totally unacceptable environment to write code and test in. Also, rails boot time on docker for mac was crazy slow. Running unit tests became a huge pain in the ass.
- eadz 9y agoAgreed. If you're using webpack, dev-in-docker won't work well at if at all. For an API-only rails app, it does seem to be fast enough.
- s_kilk 9y agoThe ghastly performance of docker-for-mac was a large factor in my move back to Linux (a few months ago) after a few years on OSX.
- ty_a 9y agoI see a roughly 66% performance hit on docker for Mac in most metrics. Not a deal breaker but I prefer to do development on Linux as well for that reason.