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:
parent
7961feb901
commit
4d905555b4
3
.gitignore
vendored
3
.gitignore
vendored
@ -25,3 +25,6 @@ Icon
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# Factorio
|
||||
saves/*
|
||||
|
@ -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 \
|
||||
|
6
init.sh
6
init.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user