mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2024-12-25 02:18:22 +01:00
set rcon password
This commit is contained in:
parent
833de3cc46
commit
b53d98cb2a
@ -7,7 +7,7 @@ COPY ./factorio.crt /opt/factorio.crt
|
||||
ENV VERSION=0.14.17 \
|
||||
SHA1=ffb248fabed345aafadb6a8cdef3684312ac240f
|
||||
|
||||
RUN apk --update --no-cache add bash curl tini && \
|
||||
RUN apk --update --no-cache add bash curl tini pwgen && \
|
||||
curl -sSL --cacert /opt/factorio.crt \
|
||||
https://www.factorio.com/get-download/$VERSION/headless/linux64 \
|
||||
-o /tmp/factorio_headless_x64_$VERSION.tar.gz && \
|
||||
|
@ -8,6 +8,10 @@ mkdir -p /factorio/saves
|
||||
mkdir -p /factorio/mods
|
||||
mkdir -p /factorio/config
|
||||
|
||||
if [ ! -f /factorio/config/rconpw ]; then
|
||||
echo $(pwgen 15 1) > /factorio/config/rconpw
|
||||
fi
|
||||
|
||||
if [ ! -f /factorio/config/server-settings.json ]; then
|
||||
cp /opt/factorio/data/server-settings.example.json /factorio/config/server-settings.json
|
||||
fi
|
||||
@ -25,4 +29,6 @@ fi
|
||||
exec /opt/factorio/bin/x64/factorio \
|
||||
--port 34197 \
|
||||
--start-server-load-latest \
|
||||
--server-settings /opt/factorio/data/server-settings.json
|
||||
--server-settings /opt/factorio/data/server-settings.json \
|
||||
--rcon-port 27015 \
|
||||
--rcon-password "$(cat /factorio/config/rconpw)"
|
||||
|
Loading…
Reference in New Issue
Block a user