thecodingmachine / docker-images-nodejs

A set of Node.js Docker images
MIT License
10 stars 8 forks source link

Yarn global installed packages without being root are not accessible in PATH #5

Open moufmouf opened 4 years ago

moufmouf commented 4 years ago
FROM thecodingmachine/nodejs:12

RUN yarn global add pm2

CMD [ "pm2-runtime", "index.js"]

This fails because yarn global when not run as root will put bin files in /home/docker/.yarn/bin. This directory should be part of PATH.