I´ve added a new arg PRE_INSTALL_SCRIPT that let´s you do heavy installation tasks before the Meteor installation.
The problem is that with every build the Node and Meteor packages get redownloaded and the application gets rebuilded which invalidates the cache of all following layers.
In my case I needed to install the Android SDK into the image which lead to build times of over 30-40 min because it got installed again every single time, although it usually doesn´t get updated too often.
Maybe it would also make sense to split up the RUN statement and separate the Meteor, Node and Mongo installation from the application build and also implement caching for NPM. This would speed up things a lot more.
I´ve added a new arg PRE_INSTALL_SCRIPT that let´s you do heavy installation tasks before the Meteor installation.
The problem is that with every build the Node and Meteor packages get redownloaded and the application gets rebuilded which invalidates the cache of all following layers.
In my case I needed to install the Android SDK into the image which lead to build times of over 30-40 min because it got installed again every single time, although it usually doesn´t get updated too often.
Maybe it would also make sense to split up the RUN statement and separate the Meteor, Node and Mongo installation from the application build and also implement caching for NPM. This would speed up things a lot more.