run as factorio user

This commit is contained in:
David Andersen
2017-12-13 18:33:51 +00:00
parent 1ce5c5db7e
commit cb5bc74e4b
3 changed files with 36 additions and 9 deletions

5
0.16/docker-entrypoint.sh Normal file → Executable file
View File

@ -2,6 +2,8 @@
set -e
id
SAVES=/factorio/saves
CONFIG=/factorio/config
@ -9,6 +11,8 @@ mkdir -p $SAVES
mkdir -p /factorio/mods
mkdir -p $CONFIG
#chown -R factorio /factorio
if [ ! -f $CONFIG/rconpw ]; then
echo $(pwgen 15 1) > $CONFIG/rconpw
fi
@ -32,6 +36,7 @@ if ! find -L $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then
--map-settings $CONFIG/map-settings.json
fi
#exec "$@"
exec /opt/factorio/bin/x64/factorio \
--port $PORT \
--start-server-load-latest \