{"action":"created","issue":{"url":"https://api.github.com/repos/joyent/docker-node/issues/3","labels_url":"https://api.github.com/repos/joyent/docker-node/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/joyent/docker-node/issues/3/comments","events_url":"https://api.github.com/repos/joyent/docker-node/issues/3/events","html_url":"https://github.com/joyent/docker-node/issues/3","id":55870212,"number":3,"title":"npm install --production","user":{"login":"Guuz","id":810327,"avatar_url":"https://avatars.githubusercontent.com/u/810327?v=3","gravatar_id":"","url":"https://api.github.com/users/Guuz","html_url":"https://github.com/Guuz","followers_url":"https://api.github.com/users/Guuz/followers","following_url":"https://api.github.com/users/Guuz/following{/other_user}","gists_url":"https://api.github.com/users/Guuz/gists{/gist_id}","starred_url":"https://api.github.com/users/Guuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Guuz/subscriptions","organizations_url":"https://api.github.com/users/Guuz/orgs","repos_url":"https://api.github.com/users/Guuz/repos","events_url":"https://api.github.com/users/Guuz/events{/privacy}","received_events_url":"https://api.github.com/users/Guuz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-29T08:28:24Z","updated_at":"2015-01-29T14:29:59Z","closed_at":null,"body":"Hi,\r\n\r\nI have submitted this in multiple repo's now but got redirected to this one.\r\nhttps://github.com/dockerfile/nodejs-runtime/issues/1\r\nhttps://github.com/GoogleCloudPlatform/nodejs-docker/issues/27\r\nMy thoughts on the `npm install` command used:\r\n\r\n-------------------------------\r\n\r\nI 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.\r\n\r\nWhat 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?\r\n\r\nThanks for the help!"},"comment":{"url":"https://api.github.com/repos/joyent/docker-node/issues/comments/72033318","html_url":"https://github.com/joyent/docker-node/issues/3#issuecomment-72033318","issue_url":"https://api.github.com/repos/joyent/docker-node/issues/3","id":72033318,"user":{"login":"md5","id":76367,"avatar_url":"https://avatars.githubusercontent.com/u/76367?v=3","gravatar_id":"","url":"https://api.github.com/users/md5","html_url":"https://github.com/md5","followers_url":"https://api.github.com/users/md5/followers","following_url":"https://api.github.com/users/md5/following{/other_user}","gists_url":"https://api.github.com/users/md5/gists{/gist_id}","starred_url":"https://api.github.com/users/md5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/md5/subscriptions","organizations_url":"https://api.github.com/users/md5/orgs","repos_url":"https://api.github.com/users/md5/repos","events_url":"https://api.github.com/users/md5/events{/privacy}","received_events_url":"https://api.github.com/users/md5/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T14:29:59Z","updated_at":"2015-01-29T14:29:59Z","body":"It sounds like you're using the onbuild image. If you switch to the normal\nimage (e.g. 0.10), you can write any npm install command you want.\n\nAs for using --production by default, I don't think it's appropriate for\nthe onbuild image. For one thing, changing it could break existing\ndownstream images. Secondly, the onbuild image in my mind is a least-effort\nturnkey image for the simplest cases, so it shouldn't surprise people by\ndoing something other than the simplest thing. In many cases that I've\nseen, projects don't have their dependencies and devDependencies correctly\nseparated anyways."}}