docker: Make sure APP_HOME is editable by the user

Otherwise MuWire won't be able to write into the home

#32 - Docker image
pull/33/head
LoveIsGrief 2020-01-14 17:14:41 +01:00
parent a7bdd47fcd
commit 758af6f48e
No known key found for this signature in database
GPG Key ID: E96D1EDFA05345EB
1 changed files with 6 additions and 0 deletions

View File

@ -17,4 +17,10 @@ chmod 640 /etc/shadow
echo "$APP_USER:x:$USER_ID:$GROUP_ID::${APP_HOME:-/dev/null}:/sbin/nologin" >> /etc/passwd
echo "$APP_USER:x:$GROUP_ID:" >> /etc/group
# Make sure APP_HOME is editable by the user
if [[ -n "$APP_HOME" ]] ; then
chown -R "$APP_USER" "$APP_HOME"
chmod -R u+rw "$APP_HOME"
fi
# vim:ft=sh:ts=4:sw=4:et:sts=4