Hi,
I have submitted this in multiple repo's now but got redirected to this one.
dockerfile/nodejs-runtime#1
GoogleCloudPlatform/nodejs-docker#27
My thoughts on the npm install command used:
I think you actually want to run npm install --production instead of npm install. This decreases the size of projects that use separate dependencies and devDependencies in the package.json. This is pretty common. I think the majority of the people want to actually run it with the --production flag but they do not know about it. I think this is a better default and people that for some reason want to build the docker image with devDependencies can use a workaround.
What is the best way to work around this? Can you overwrite certain commands or should you use your own docker file by copy pasting this one?
Thanks for the help!
Hi,
I have submitted this in multiple repo's now but got redirected to this one.
dockerfile/nodejs-runtime#1
GoogleCloudPlatform/nodejs-docker#27
My thoughts on the
npm installcommand used:I think you actually want to run npm install --production instead of npm install. This decreases the size of projects that use separate dependencies and devDependencies in the package.json. This is pretty common. I think the majority of the people want to actually run it with the
--productionflag but they do not know about it. I think this is a better default and people that for some reason want to build the docker image with devDependencies can use a workaround.What is the best way to work around this? Can you overwrite certain commands or should you use your own docker file by copy pasting this one?
Thanks for the help!