1
0
mirror of https://github.com/bplein/factorio-docker.git synced 2024-11-28 08:58:42 +02:00

make scripts executable

This commit is contained in:
David Andersen 2019-02-26 19:44:26 +00:00
parent 31b6768882
commit f5ffae1cb4
4 changed files with 8 additions and 2 deletions

View File

@ -41,6 +41,6 @@ EXPOSE $PORT/udp $RCON_PORT/tcp
COPY files/ /
USER $USER
#USER $USER
ENTRYPOINT ["/docker-entrypoint.sh"]

8
0.17/files/docker-entrypoint.sh Normal file → Executable file
View File

@ -3,6 +3,8 @@ set -e
id
FACTORIO_VOL=/factorio
mkdir -p $FACTORIO_VOL
mkdir -p $SAVES
mkdir -p $CONFIG
mkdir -p $MODS
@ -36,7 +38,11 @@ if ! find -L $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then
--map-settings $CONFIG/map-settings.json
fi
exec /opt/factorio/bin/x64/factorio \
if [ "$(id -u)" = '0' ]; then
chown -R factorio:factorio $FACTORIO_VOL
fi
exec gosu factorio /opt/factorio/bin/x64/factorio \
--port $PORT \
--start-server-load-latest \
--server-settings $CONFIG/server-settings.json \

0
0.17/files/scenario.sh Normal file → Executable file
View File

0
0.17/files/scenario2map.sh Normal file → Executable file
View File