logoalt Hacker News

ashishbyesterday at 6:32 PM1 replyview on HN

Run npm and yarn inside docker [1].

Infact, do this for all risky tools[2]

1 - https://github.com/ashishb/dotfiles/blob/067de6f90c72f0cf849...

2 - https://ashishb.net/programming/run-tools-inside-docker/


Replies

anpatyesterday at 7:39 PM

I think it's better to not run npm as root user on container. I would suggest adding --user 1000 to your docker run command.

show 1 reply