3 ms·
Run npm and yarn inside docker [1]. Infact, do this for all risky tools[2] 1 - https://github.com/ashishb/dotfiles/blob/067de6f90c72f0cf849fb6edcd941b347712ce
by ashishb 11mo ago
Run npm and yarn inside docker [1].
Infact, do this for all risky tools[2]
1 - https://github.com/ashishb/dotfiles/blob/067de6f90c72f0cf849fb6edcd941b347712ced9/bashrc_includes/custom_aliases.bash#L19-L21 https://github.com/ashishb/dotfiles/blob/067de6f90c72f0cf849...
2 - https://ashishb.net/programming/run-tools-inside-docker/ https://ashishb.net/programming/run-tools-inside-docker/
- anpat 11mo agoI think it's better to not run npm as root user on container. I would suggest adding --user 1000 to your docker run command.
- ashishb 11mo ago> 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. Good point. Here's the improvement that work for me https://github.com/ashishb/dotfiles/commit/fe4fb15fe867bf77a53e0754c8444d87dd4abcf4 https://github.com/ashishb/dotfiles/commit/fe4fb15fe867bf77a...
- jayknight 11mo agoIt gets tricky with private dependencies, then you have to pass some sort of token into the container to authenticate with the host when installing dependencies.
- ashishb 11mo agoDefinitely. Would you prefer doing those tricks or exposing everything on your machine to random npm packages?