Skip to content

Instantly share code, notes, and snippets.

@jdnielss
Forked from artemgordinskiy/node-npm-in-docker.sh
Created January 10, 2022 17:12
Show Gist options
  • Save jdnielss/02447e9414043616a5c7080ea9165f05 to your computer and use it in GitHub Desktop.
Save jdnielss/02447e9414043616a5c7080ea9165f05 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