2 ms·
> this means that every time you add a new dependency, it takes 15 minutes to rebuild the first time you `docker-compose up` right? Yes > If this is the case,
by save_ferris 6y ago
> this means that every time you add a new dependency, it takes 15 minutes to rebuild the first time you `docker-compose up` right?
Yes
> If this is the case, isn't this orders of magnitude faster than adding the dependency manually.
No. When developing a rails server running locally, you just need to install the new dependency via bundle install (usually takes just a few seconds) and then your server is ready to run again. With docker, the image needs to be entirely rebuilt, which is a much slower process, even with good caching. The difference is that docker treats the build as ephemeral and willing to be thrown away and rebuilt, as opposed to running directly, which simply augments the existing environment. It’s a much, much slower process to rebuild via docker.
- deleted 6y ago[deleted]