gpg --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && break || : ; \
done; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
- rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
+ rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
chmod +x /usr/local/bin/gosu; \
gosu nobody true; \
\
ENV NODE_CONFIG_DIR /app/support/docker/production/config
USER root
-RUN mkdir /data
+RUN mkdir /data && chown peertube:peertube /data
VOLUME /data
COPY ./support/docker/production/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
fi
# allow the container to be started with `--user`
-if [ "$1" = 'npm' -a "$(id -u)" != '0' ]; then
+if [ "$1" = 'npm' -a "$(id -u)" = '0' ]; then
chown -R peertube:peertube /data
exec gosu peertube "$0" "$@"
fi