Armin Friedl
7aaea2ed2f
Newer npm expects a cache directory under `/.npm`. We cleaned the cache and npm cannot create the directory anymore at runtime (we drop privileges). So we have to create the `/.npm` directory again during container build and later re-own it. In `run.sh` re-own `/.npm` so it is accessible when we later drop privileges.
10 lines
203 B
Bash
10 lines
203 B
Bash
#!/bin/sh
|
|
|
|
set -xe
|
|
|
|
# we have to run the chown here since the VOLUME is mounted
|
|
# after the build with root:root
|
|
chown -R ${UID}:${GID} /app
|
|
chown -R ${UID}:${GID} /.npm
|
|
|
|
su-exec ${UID}:${GID} npm start
|