Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@feload
Forked from artemgordinskiy/node-npm-in-docker.sh
Created April 21, 2017 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feload/140d9d14df629565eed9f45e6ce0a8e3 to your computer and use it in GitHub Desktop.
Save feload/140d9d14df629565eed9f45e6ce0a8e3 to your computer and use it in GitHub Desktop.
Run Node/NPM in a Docker container
# For example, run "npm install"
docker run -v "$PWD":/usr/src/app -w /usr/src/app node:4 npm install
# This command creates a container (downloading one first if you don't have it locally), runs the command in a current directory and quits the container
# Great Success!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment