diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/docker/production/Dockerfile.stretch | 4 | ||||
-rwxr-xr-x | support/docker/production/docker-entrypoint.sh | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/support/docker/production/Dockerfile.stretch b/support/docker/production/Dockerfile.stretch index 5bb67f816..999ab9da4 100644 --- a/support/docker/production/Dockerfile.stretch +++ b/support/docker/production/Dockerfile.stretch | |||
@@ -41,7 +41,7 @@ RUN set -ex; \ | |||
41 | gpg --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && break || : ; \ | 41 | gpg --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && break || : ; \ |
42 | done; \ | 42 | done; \ |
43 | gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ | 43 | gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ |
44 | rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \ | 44 | rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \ |
45 | chmod +x /usr/local/bin/gosu; \ | 45 | chmod +x /usr/local/bin/gosu; \ |
46 | gosu nobody true; \ | 46 | gosu nobody true; \ |
47 | \ | 47 | \ |
@@ -64,7 +64,7 @@ ENV NODE_ENV production | |||
64 | ENV NODE_CONFIG_DIR /app/support/docker/production/config | 64 | ENV NODE_CONFIG_DIR /app/support/docker/production/config |
65 | 65 | ||
66 | USER root | 66 | USER root |
67 | RUN mkdir /data | 67 | RUN mkdir /data && chown peertube:peertube /data |
68 | VOLUME /data | 68 | VOLUME /data |
69 | 69 | ||
70 | COPY ./support/docker/production/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh | 70 | COPY ./support/docker/production/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh |
diff --git a/support/docker/production/docker-entrypoint.sh b/support/docker/production/docker-entrypoint.sh index 4099a1984..ba9fcfed5 100755 --- a/support/docker/production/docker-entrypoint.sh +++ b/support/docker/production/docker-entrypoint.sh | |||
@@ -8,7 +8,7 @@ if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then | |||
8 | fi | 8 | fi |
9 | 9 | ||
10 | # allow the container to be started with `--user` | 10 | # allow the container to be started with `--user` |
11 | if [ "$1" = 'npm' -a "$(id -u)" != '0' ]; then | 11 | if [ "$1" = 'npm' -a "$(id -u)" = '0' ]; then |
12 | chown -R peertube:peertube /data | 12 | chown -R peertube:peertube /data |
13 | exec gosu peertube "$0" "$@" | 13 | exec gosu peertube "$0" "$@" |
14 | fi | 14 | fi |