0
0
Fork 0

Fix #2680 - Run processes in Docker as non-root user (#3159)

This commit is contained in:
Wonderfall 2017-05-20 15:12:29 +02:00 committed by Eugen Rochko
parent 2c405aed55
commit d972845ff6
2 changed files with 14 additions and 2 deletions

4
docker_entrypoint.sh Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
addgroup -g ${GID} mastodon && adduser -h /mastodon -s /bin/sh -D -G mastodon -u ${UID} mastodon
find /mastodon -path /mastodon/public/system -prune -o -not -user mastodon -not -group mastodon -print0 | xargs -0 chown -f mastodon:mastodon
su-exec mastodon:mastodon /sbin/tini -- "$@"