Best practice for node and node_modules app


I have an Ember app with a node_modules directory that contains all node modules. This directory can be large, more than 100mo. I have some modules with the same directory.

I want to host my image on docker-hub but I don’t want to download/upload 1go… In order to minimize the space took by the image, I want to exclude node_modules repositories but I need it to run my app.

What’s the best way to not include it but to be sure that’s present ?

I think I’d specify that folder as a volume mount

I expect the first use would load it for others

(speaking without having actually done it)