No access permission error with npm global install on docker image

前端 未结 5 1818
小鲜肉
小鲜肉 2021-01-31 09:19

I\'m trying to build a docker image with a global install of firebase-tools and angular-cli. I\'m building the same image for two versions of node: 6.x (LTS bor

5条回答
  •  抹茶落季
    2021-01-31 09:25

    Use the --unsafe-perm flag:

    npm install --quiet --no-progress --unsafe-perm -g @angular/cli@latest firebase-tools
    

    I think that's still better than setting the npm user permanently to root. You can use --unsafe-perm only with the packages which cause problem

提交回复
热议问题