Skip to content

Commit

Permalink
Use proper npm options specifically for rooted prod envs
Browse files Browse the repository at this point in the history
  • Loading branch information
saki7 committed Nov 3, 2017
1 parent 0463348 commit 49470fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

NPM_OPTS="--unsafe-perm"

function show_help() {
echo "$0 build"
echo "$0 install"
Expand All @@ -22,7 +24,7 @@ fi

case "$1" in
"build" ) docker build -t kunai:0.0.0-alpine docker ;;
"install" ) docker run -v `pwd`:/var/src -p 8080:8080 $DOCKER_IT kunai:0.0.0-alpine /bin/sh -c "cd /var/src && exec npm install" ;;
"install" ) docker run -v `pwd`:/var/src -p 8080:8080 $DOCKER_IT kunai:0.0.0-alpine /bin/sh -c "cd /var/src && exec npm install $NPM_OPTS" ;;
"run" )
if [ $# -lt 2 ]; then
show_help
Expand Down

0 comments on commit 49470fa

Please sign in to comment.