{"action":"created","issue":{"url":"https://api.github.com/repos/GPII/universal/issues/704","repository_url":"https://api.github.com/repos/GPII/universal","labels_url":"https://api.github.com/repos/GPII/universal/issues/704/labels{/name}","comments_url":"https://api.github.com/repos/GPII/universal/issues/704/comments","events_url":"https://api.github.com/repos/GPII/universal/issues/704/events","html_url":"https://github.com/GPII/universal/pull/704","id":375643340,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MDQyMjYz","number":704,"title":"GPII-3483:  Docker image build fails on 'postinstall' script running the 'npm install' command","user":{"login":"klown","id":565007,"node_id":"MDQ6VXNlcjU2NTAwNw==","avatar_url":"https://avatars1.githubusercontent.com/u/565007?v=4","gravatar_id":"","url":"https://api.github.com/users/klown","html_url":"https://github.com/klown","followers_url":"https://api.github.com/users/klown/followers","following_url":"https://api.github.com/users/klown/following{/other_user}","gists_url":"https://api.github.com/users/klown/gists{/gist_id}","starred_url":"https://api.github.com/users/klown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klown/subscriptions","organizations_url":"https://api.github.com/users/klown/orgs","repos_url":"https://api.github.com/users/klown/repos","events_url":"https://api.github.com/users/klown/events{/privacy}","received_events_url":"https://api.github.com/users/klown/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-10-30T18:54:40Z","updated_at":"2018-11-06T16:02:14Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/GPII/universal/pulls/704","html_url":"https://github.com/GPII/universal/pull/704","diff_url":"https://github.com/GPII/universal/pull/704.diff","patch_url":"https://github.com/GPII/universal/pull/704.patch"},"body":"https://issues.gpii.net/projects/GPII/issues/GPII-3483\r\n\r\n@stepanstipl Here is a fix.  I'm not an `npm install` expert and the `--unsafe-perm` flag sounds dangerous, but it works.  The npm documentation says that when running `npm install` as root, it changes its UID to something less privileged, and that's why the `postinstall` script fails.  Using the flag keeps the UID as root.  See:\r\nhttps://docs.npmjs.com/misc/scripts#user\r\n\r\nWhen building docker images, is the effective user root, or has root privileges?"},"comment":{"url":"https://api.github.com/repos/GPII/universal/issues/comments/436306352","html_url":"https://github.com/GPII/universal/pull/704#issuecomment-436306352","issue_url":"https://api.github.com/repos/GPII/universal/issues/704","id":436306352,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjMwNjM1Mg==","user":{"login":"klown","id":565007,"node_id":"MDQ6VXNlcjU2NTAwNw==","avatar_url":"https://avatars1.githubusercontent.com/u/565007?v=4","gravatar_id":"","url":"https://api.github.com/users/klown","html_url":"https://github.com/klown","followers_url":"https://api.github.com/users/klown/followers","following_url":"https://api.github.com/users/klown/following{/other_user}","gists_url":"https://api.github.com/users/klown/gists{/gist_id}","starred_url":"https://api.github.com/users/klown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klown/subscriptions","organizations_url":"https://api.github.com/users/klown/orgs","repos_url":"https://api.github.com/users/klown/repos","events_url":"https://api.github.com/users/klown/events{/privacy}","received_events_url":"https://api.github.com/users/klown/received_events","type":"User","site_admin":false},"created_at":"2018-11-06T16:02:14Z","updated_at":"2018-11-06T16:02:14Z","author_association":"CONTRIBUTOR","body":"`npm install --user node -g` fails on CI duplicating what I found in my VM.  Currently, looking for a way to configure `npm` or `node-gyp` or some combination of them such that `node-gyp` can run as user `node`. "}}
{"actor":{"display_login":"klown"}}