1
0
mirror of https://github.com/LpmRaven/factorio-docker-server.git synced 2024-11-30 08:06:56 +02:00

Added env for save game file

This commit is contained in:
Carlo Eugster 2016-10-03 21:56:10 +02:00
parent 7961feb901
commit 4d905555b4
3 changed files with 9 additions and 3 deletions

3
.gitignore vendored
View File

@ -25,3 +25,6 @@ Icon
Network Trash Folder
Temporary Items
.apdisk
# Factorio
saves/*

View File

@ -10,7 +10,10 @@ RUN apt-get update \
RUN useradd -m -d /opt/factorio -s /bin/bash factorio \
&& chown -R factorio.factorio /opt/factorio
USER factorio
ENV HOME /opt/factorio
ENV SAVEFILE /opt/factorio/saves/factorio_save.zip
WORKDIR /opt/factorio
RUN wget -q -O - https://www.factorio.com/download-headless/stable | grep -o -m1 "/get-download/.*/headless/linux64" | awk '{print "--no-check-certificate https://www.factorio.com"$1" -O /tmp/factorio.tar.gz"}' | xargs wget \

View File

@ -1,6 +1,6 @@
#!/bin/bash
if [ ! -f /opt/factorio/saves/save0.zip ]; then
/opt/factorio/bin/x64/factorio --create save0
if [ ! -f $SAVEFILE ]; then
/opt/factorio/bin/x64/factorio --create $SAVEFILE
fi
/opt/factorio/bin/x64/factorio --start-server save0
/opt/factorio/bin/x64/factorio --start-server $SAVEFILE