[openstreetmap/openstreetmap-website] Enable the app to be built using Docker (#1290)

Paul Norman notifications at github.com
Fri Sep 16 05:07:00 UTC 2016


> Also if I'm reading that right it's relying on a prebuilt image rather that using a stock image and checking out the code? So anybody that uses this is going to start with a snapshot of the code from heaven knows when rather than something current?

After reviewing everything I *think* I understand everything, but take it with a grain of salt because I don't fully understand docker-compose. When docker **builds** the image it copies the Gemfile and Gemfile.lock and does a `bundle install`. When the image is **run** it copies the local directory and runs the rails port, using what was in the local directory when the image was run.

I think this works because if the gemfiles are touched it invalidates that layer of the build and requires it to be rebuilt, while the next steps (`bundle install`) do not depend on the rest of the website code.

If this works it means that you can make changes and test them without having to do a new `bundle install`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1290#issuecomment-247519211
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160915/4e54314f/attachment.html>


More information about the rails-dev mailing list