Skip to content

Instantly share code, notes, and snippets.

@vlastv
Last active November 1, 2016 19:22
Show Gist options
  • Save vlastv/ada4ebdd00b7fb6d9a0a to your computer and use it in GitHub Desktop.
Save vlastv/ada4ebdd00b7fb6d9a0a to your computer and use it in GitHub Desktop.
Docker for npm on Mac OS X
#!/bin/sh
set -e
set -- npm "$@"
docker run -it --rm \
-v cache:/root/.npm \
-v $(pwd):/usr/src/app \
-v $HOME/.ssh:/root/.ssh \
-w /usr/src/app \
-e bower_interactive=false \
-e bower_allow_root=true \
-e npm_config_unsafe-perm=true \
-p 8080:8080 \
node \
$@
@vlastv
Copy link
Author

vlastv commented Oct 7, 2015

chmod +x npm.docker

./npm.docker install
./npm.docker start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment