Use --unsafe-perm npm flags inside docker build
Created by: mbarbero
From https://docs.npmjs.com/misc/scripts#user
If npm was invoked with root privileges, then it will change the uid to the user account or uid specified by the user config, which defaults to nobody. Set the unsafe-perm flag to run scripts with root privileges.