JustFixNYC / tenants2

The JustFix tenant platform!
https://app.justfix.org/
GNU General Public License v3.0
23 stars 4 forks source link

Consider using multi-stage builds instead of multiple dockerfiles #134

Open toolness opened 6 years ago

toolness commented 6 years ago

When I originally implemented the Docker support, I didn’t know about these: https://docs.docker.com/develop/develop-images/multistage-build/

toolness commented 5 years ago

It looks like Heroku supports multi-stage Dockerfiles. Docker Compose supports it as of compose file format 2.3, which I think we can use but I'm not sure.

Our current container image is getting kind of large so it'd be nice to make the production image a bit smaller by e.g. removing development-only dependencies (like sqlite and Git LFS) and choosing a slimmer base image (probably not alpine, but one of the other smaller options).