From 4aeb67a569b30a233dcff2eaf9c564d62ccd6497 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 16 Apr 2018 18:44:57 +0200 Subject: Improve dockerfile --- support/docker/production/docker-entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'support/docker/production/docker-entrypoint.sh') diff --git a/support/docker/production/docker-entrypoint.sh b/support/docker/production/docker-entrypoint.sh index 79f0e60f6..4099a1984 100755 --- a/support/docker/production/docker-entrypoint.sh +++ b/support/docker/production/docker-entrypoint.sh @@ -4,13 +4,13 @@ set -e # first arg is `-f` or `--some-option` # or first arg is `something.conf` if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then - set -- npm "$@" + set -- npm "$@" fi # allow the container to be started with `--user` -if [ "$1" = 'npm' -a "$(id -u)" = '0' ]; then - chown -R peertube: /data - exec gosu peertube "$0" "$@" +if [ "$1" = 'npm' -a "$(id -u)" != '0' ]; then + chown -R peertube:peertube /data + exec gosu peertube "$0" "$@" fi exec "$@" -- cgit v1.2.3