praekeltfoundation / casepro

Case management dashboard for RapidPro
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Use docker multi-stage builds #231

Open rudigiesler opened 5 years ago

rudigiesler commented 5 years ago

Currently there are some things that we apt-get install, just to run a command, and then uninstall them again (eg. installing node, to generate static files)

This is better solved by using docker's multi-stage builds, where we can have a container where we install everything we need, and run the commands to generate the outputs we require (eg. static files).

Then in our main container we just copy over those generated files from our build step container.

https://docs.docker.com/develop/develop-images/multistage-build/