4 ms·
Nice concise write-up. Worth also calling out some issues you'll run into though: - docker for mac's osxfs is incredibly slow and makes the cold rails start tim
by dcosson 9y ago
Nice concise write-up. Worth also calling out some issues you'll run into though:
- docker for mac's osxfs is incredibly slow and makes the cold rails start time even slower than it already is. Docker-sync is a third party tool that makes it pretty easy to sync code over instead of using a shared file system.
- similarly, rails cold start times are so slow on their own that you won't want to 'docker run' your commands. I always 'docker exec' them into the already running rails container to take advantage of the spring cache.
- the bundle incremental cache isn't used (and if you have a package.json for us resources, you'll have to solve the same problem for that too).
These are arguably downsides of both ruby/rails and docker that combine to make things a little harder to work with than you'd hope.
Still, its a useful workflow if you want to deploy to docker in production. It's nice running the app in the same OS with the same exact dependencies in dev/ci as in prod (plus the same configuration between different people on the team).