diff --git a/0.16/Dockerfile b/0.16/Dockerfile index 760034a..dfb567b 100644 --- a/0.16/Dockerfile +++ b/0.16/Dockerfile @@ -14,8 +14,7 @@ ENV PORT=34197 \ SAVES=/factorio/saves \ CONFIG=/factorio/config \ MODS=/factorio/mods \ - SCENARIOS=/factorio/scenarios \ - ENTRYPOINTS=/factorio/entrypoints + SCENARIOS=/factorio/scenarios RUN mkdir -p /opt /factorio && \ apk add --update --no-cache pwgen && \ @@ -26,10 +25,9 @@ RUN mkdir -p /opt /factorio && \ tar xf /tmp/factorio_headless_x64_$VERSION.tar.xz --directory /opt && \ chmod ugo=rwx /opt/factorio && \ rm /tmp/factorio_headless_x64_$VERSION.tar.xz && \ - ln -s -f $SAVES /opt/factorio/saves && \ - ln -s -f $MODS /opt/factorio/mods && \ - ln -s -f $SCENARIOS /opt/factorio/scenarios && \ - ln -s -f $ENTRYPOINTS /opt/factorio/entrypoints && \ + ln -s $SAVES /opt/factorio/saves && \ + ln -s $MODS /opt/factorio/mods && \ + ln -s $SCENARIOS /opt/factorio/scenarios && \ apk del .build-deps && \ addgroup -g $PGID -S $GROUP && \ adduser -u $PUID -G $GROUP -s /bin/sh -SDH $USER && \ @@ -40,11 +38,8 @@ VOLUME /factorio EXPOSE $PORT/udp $RCON_PORT/tcp COPY ./docker-entrypoint.sh / -COPY ./scenario2map.sh /factorio/entrypoints -COPY ./scenario.sh /factorio/entrypoints - -#symbolic link the default entrypoint to the entrypoints directory so it can be inspected and copied to new entrypoints -#RUN ln -s -f /docker-entrypoint.sh $ENTRYPOINTS/docker-entrypoint.sh +COPY ./scenario2map.sh / +COPY ./scenario.sh / USER $USER diff --git a/0.16/docker-entrypoint.sh b/0.16/docker-entrypoint.sh index 985e251..43e797a 100755 --- a/0.16/docker-entrypoint.sh +++ b/0.16/docker-entrypoint.sh @@ -7,8 +7,7 @@ id mkdir -p $SAVES mkdir -p $CONFIG mkdir -p $MODS - -#chown -R factorio /factorio +mkdir -p $SCENARIOS if [ ! -f $CONFIG/rconpw ]; then echo $(pwgen 15 1) > $CONFIG/rconpw diff --git a/0.16/scenario.sh b/0.16/scenario.sh index a900fd1..588e51c 100755 --- a/0.16/scenario.sh +++ b/0.16/scenario.sh @@ -9,11 +9,6 @@ set -e id -SAVES=/factorio/saves -CONFIG=/factorio/config -MODS=/factorio/mods -SCENARIOS=/factorio/scenarios - mkdir -p $SAVES mkdir -p $CONFIG mkdir -p $MODS diff --git a/0.16/scenario2map.sh b/0.16/scenario2map.sh index 524299d..f95d08d 100755 --- a/0.16/scenario2map.sh +++ b/0.16/scenario2map.sh @@ -9,18 +9,11 @@ set -e id -SAVES=/factorio/saves -CONFIG=/factorio/config -MODS=/factorio/mods -SCENARIOS=/factorio/scenarios - mkdir -p $SAVES mkdir -p $CONFIG mkdir -p $MODS mkdir -p $SCENARIOS -#chown -R factorio /factorio - if [ ! -f $CONFIG/server-settings.json ]; then cp /opt/factorio/data/server-settings.example.json $CONFIG/server-settings.json fi diff --git a/README.md b/README.md index d25379a..8c4d3e3 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ docker run -d \ -v /opt/factorio:/factorio \ --name factorio \ --restart=always \ - --entrypoint "/factorio/entrypoints/scenario.sh" \ + --entrypoint "/scenario.sh" \ dtandersen/factorio \ MyScenarioName ``` @@ -140,7 +140,7 @@ docker run -d \ -v /opt/factorio:/factorio \ --name factorio \ --restart=always \ - --entrypoint "/factorio/entrypoints/scenario2map.sh" \ + --entrypoint "/scenario2map.sh" \ dtandersen/factorio MyScenarioName ```