From 6241892e3ab9ca621ef74c8f1fb9274145268001 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Fri, 6 Oct 2017 02:26:19 +0200 Subject: [PATCH] Pass `--unsafe-perm` flag to npm when running in Docker dev env. Works around #5. --- docker-compose.dev.yml | 7 +++++-- install_and_run.sh | 7 +++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index ceb0561..dda574d 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -10,13 +10,16 @@ services: dockerfile: Dockerfile.dev command: [sh, /app/install_and_run.sh] - + tty: true - + environment: NPM_CONFIG_CACHE: /var/tmp/npm_cache NODE_ENV: development + tmpfs: + - /tmp + volumes: - .:/app - npm_cache:/var/tmp/npm_cache diff --git a/install_and_run.sh b/install_and_run.sh index 8a16307..e0d252f 100755 --- a/install_and_run.sh +++ b/install_and_run.sh @@ -2,7 +2,6 @@ set -e -npm install --unsafe-perm -npm run build -exec npm run start:directly - +npm --unsafe-perm install +npm --unsafe-perm run build +exec npm --unsafe-perm run start:directly