Add support for changing UID/GID (#216)

* Add support for changing UID/GID

* Revert volume definition in docker-compose file
This commit is contained in:
Dan Anstis
2019-04-18 21:00:14 +10:00
committed by Florian Kinder
parent 2ffac3c4a8
commit 288f080ebc
3 changed files with 10 additions and 4 deletions

View File

@ -35,6 +35,9 @@ if find -L $SAVES -iname \*.tmp.zip -mindepth 1 -print | grep -q .; then
fi
if [ "$(id -u)" = '0' ]; then
# Update the User and Group ID based on the PUID/PGID variables
usermod -u $PUID factorio
groupmod -g $PGID factorio
# Take ownership of factorio data if running as root
chown -R factorio:factorio $FACTORIO_VOL
# Make sure we own temp