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

Replace symlinks with config option write-data

Closes #311
This commit is contained in:
Sandro Jäckel 2020-05-18 02:35:37 +02:00
parent 15a2d493f8
commit 64a1f8d9bf
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 12 additions and 8 deletions

View File

@ -30,10 +30,12 @@ RUN set -ox pipefail \
&& tar xf "$archive" --directory /opt \
&& chmod ugo=rwx /opt/factorio \
&& rm "$archive" \
&& ln -s "$SAVES" /opt/factorio/saves \
&& ln -s "$MODS" /opt/factorio/mods \
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
&& ln -s "$SCRIPTOUTPUT" /opt/factorio/script-output \
&& mkdir -p /opt/factorio/config/ \
&& printf "\
[path]\n\
read-data=__PATH__executable__/../../data\n\
write-data=/factorio\n\
" >> /opt/factorio/config/config.ini \
&& addgroup -g "$PGID" -S "$GROUP" \
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio

View File

@ -30,10 +30,12 @@ RUN set -ox pipefail \
&& tar xf "$archive" --directory /opt \
&& chmod ugo=rwx /opt/factorio \
&& rm "$archive" \
&& ln -s "$SAVES" /opt/factorio/saves \
&& ln -s "$MODS" /opt/factorio/mods \
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
&& ln -s "$SCRIPTOUTPUT" /opt/factorio/script-output \
&& mkdir -p /opt/factorio/config/ \
&& printf "\
[path]\n\
read-data=__PATH__executable__/../../data\n\
write-data=/factorio\n\
" >> /opt/factorio/config/config.ini \
&& addgroup -g "$PGID" -S "$GROUP" \
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio