Skip to content

npm install --production #3

@Guuz

Description

@Guuz

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions