So I want to install packages locally using npm from docker but how do I specify the image?
I tried doing following:
docker run --rm -v $(pwd):/app npm install
So I want to install packages locally using npm from docker but how do I specify the image?
I tried doing following:
docker run --rm -v $(pwd):/app npm install
If I understand you correctly, you can use the node image. The node image usually runs in the root directory, so you need to change into the /app directory first. Something like this
docker run --rm -v $(pwd):/app node /bin/bash -c "cd /app && npm install"