From 553f3f665275183ee92c8da63bd193553556a5dc Mon Sep 17 00:00:00 2001 From: Mads Jon Nielsen Date: Mon, 22 Mar 2021 20:20:03 +0100 Subject: [PATCH] Simplified docker-npm --- docker-npm | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/docker-npm b/docker-npm index 820d8b646..e4d47fc56 100755 --- a/docker-npm +++ b/docker-npm @@ -1,23 +1,13 @@ #!/bin/bash set -e -if [[ "${OSTYPE}" = darwin* ]]; then - HOST_SSH_AUTH_SOCK='/run/host-services/ssh-auth.sock' -else - HOST_SSH_AUTH_SOCK="${SSH_AUTH_SOCK}" -fi - mkdir -p /tmp/node-docker-home -chmod 777 -R /tmp/node-docker-home - -NPM_HOME=$(docker run -u "$(id -u):$(id -g)" node bash -c 'echo $HOME') +chmod -R 777 /tmp/node-docker-home docker run -it --rm \ -u "$(id -u):$(id -g)" \ - -e SSH_AUTH_SOCK="${HOST_SSH_AUTH_SOCK}" \ - -v "${HOST_SSH_AUTH_SOCK}:${HOST_SSH_AUTH_SOCK}" \ + -e NPM_HOME=/home/node/ \ -v "/$PWD/:/app/" \ - -v "/tmp/node-docker-home/:/$NPM_HOME/" \ + -v "/tmp/node-docker-home/:/home/node/" \ -w /app/ \ node npm "$@" -