From bf128afdb46cd1d60870325d02d8fa7f3c717bfa Mon Sep 17 00:00:00 2001 From: David Andersen Date: Tue, 26 Feb 2019 19:55:45 +0000 Subject: [PATCH 1/2] debugging branch --- 0.17/files/docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/0.17/files/docker-entrypoint.sh b/0.17/files/docker-entrypoint.sh index db7f900..2deaa93 100755 --- a/0.17/files/docker-entrypoint.sh +++ b/0.17/files/docker-entrypoint.sh @@ -2,7 +2,7 @@ set -e id - +# FACTORIO_VOL=/factorio mkdir -p $FACTORIO_VOL mkdir -p $SAVES From b840e86d2166c4d14d13e0a1a5d36cdb354a0af0 Mon Sep 17 00:00:00 2001 From: David Andersen Date: Tue, 26 Feb 2019 21:13:05 +0000 Subject: [PATCH 2/2] use su-exec instead of gosu; don't use example map settings --- 0.17/Dockerfile | 2 +- 0.17/files/docker-entrypoint.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/0.17/Dockerfile b/0.17/Dockerfile index 9824664..2f1c2e8 100644 --- a/0.17/Dockerfile +++ b/0.17/Dockerfile @@ -18,7 +18,7 @@ ENV PORT=34197 \ SCRIPTOUTPUT=/factorio/script-output RUN mkdir -p /opt /factorio && \ - apk add --update --no-cache pwgen && \ + apk add --update --no-cache pwgen su-exec && \ apk add --update --no-cache --virtual .build-deps curl && \ curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \ -o /tmp/factorio_headless_x64_$VERSION.tar.xz && \ diff --git a/0.17/files/docker-entrypoint.sh b/0.17/files/docker-entrypoint.sh index 2deaa93..cdd9c3f 100755 --- a/0.17/files/docker-entrypoint.sh +++ b/0.17/files/docker-entrypoint.sh @@ -20,7 +20,8 @@ if [ ! -f $CONFIG/server-settings.json ]; then fi if [ ! -f $CONFIG/map-gen-settings.json ]; then - cp /opt/factorio/data/map-gen-settings.example.json $CONFIG/map-gen-settings.json +# cp /opt/factorio/data/map-gen-settings.example.json $CONFIG/map-gen-settings.json + echo "{}" > $CONFIG/map-gen-settings.json fi if [ ! -f $CONFIG/map-settings.json ]; then @@ -42,11 +43,11 @@ if [ "$(id -u)" = '0' ]; then chown -R factorio:factorio $FACTORIO_VOL fi -exec gosu factorio /opt/factorio/bin/x64/factorio \ +exec su-exec factorio /opt/factorio/bin/x64/factorio \ --port $PORT \ --start-server-load-latest \ --server-settings $CONFIG/server-settings.json \ - --server-whitelist $CONFIG/server-whitelist.json \ +# --server-whitelist $CONFIG/server-whitelist.json \ --server-banlist $CONFIG/server-banlist.json \ --rcon-port $RCON_PORT \ --rcon-password "$(cat $CONFIG/rconpw)" \