hastebin-build/latest/run.sh
Armin Friedl 7aaea2ed2f Fix cache directory permissions
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.
2022-08-27 19:46:01 +02:00

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