mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-07-03 07:28:27 +02:00
Compare commits
107 Commits
Author | SHA1 | Date | |
---|---|---|---|
94f127dea9 | |||
4d43c3aabf | |||
bbacd8e67d | |||
eb0d08c3c3 | |||
dc53f6a61f | |||
92d459b14d | |||
ef55d08655 | |||
c5ae7515fe | |||
ec17a32638 | |||
15da4f79f5 | |||
68e8a5f25c | |||
b658982c93 | |||
1d3fc75d20 | |||
a4a482ee91 | |||
eafe7c08be | |||
9acfe47d16 | |||
b47b20e834 | |||
7e0718a332 | |||
ae327add0b | |||
efb5eb7afc | |||
ec1c4f9455 | |||
edf8035ae3 | |||
25b41c9f22 | |||
228339ec31 | |||
755c106b7b | |||
f1f76e9ae0 | |||
26f053451c | |||
c439634ef1 | |||
cc33c84d86 | |||
8806ca2160 | |||
83bf5c4a11 | |||
30859d57b8 | |||
3e9f74eaac | |||
14bbd68a3b | |||
d4052bc790 | |||
2fc2b7656d | |||
199f6c7f59 | |||
d614babc54 | |||
257e1751c2 | |||
e8e5047490 | |||
d089b02941 | |||
6fe77c30da | |||
a97763a0e1 | |||
602881a0d9 | |||
b56ab27e52 | |||
5edbcd9055 | |||
059a77574e | |||
c1488c61be | |||
fb0d7d955b | |||
a34b260d15 | |||
5d5cb71a90 | |||
ad9c5c37dc | |||
63a9eb14d2 | |||
76eddb14f8 | |||
24bd934d98 | |||
9c873ac907 | |||
c44a3d1faf | |||
926a377146 | |||
52bb117a2b | |||
04c4a6b577 | |||
39c27944be | |||
ba9faac10e | |||
c987fe8769 | |||
606b537b13 | |||
9473de8934 | |||
6b00a3fc32 | |||
34a99ec43e | |||
2caf5345c2 | |||
8a68a162fe | |||
96a6f66445 | |||
e5c351dd14 | |||
eedff789a5 | |||
20fcec5783 | |||
2bfa89fea1 | |||
ee99e7d469 | |||
817844352d | |||
abd518de79 | |||
98337ac18f | |||
2bd0d475eb | |||
2d9d8e17b8 | |||
48c22aa707 | |||
97feb7acb5 | |||
5ee0f8d06a | |||
7230263559 | |||
6f65ae8acc | |||
2fae0bdb22 | |||
4f10d32d7b | |||
61e3941a5a | |||
777cac4849 | |||
9a35472d8a | |||
5b3d17117f | |||
234eea09f0 | |||
c5e0b6b3b5 | |||
df19b88ba0 | |||
0a39c756a5 | |||
0cab74d578 | |||
23c26f83ae | |||
3de6931817 | |||
7a370c11e0 | |||
1a09531600 | |||
ea57f58c3b | |||
5eb71608de | |||
51398ca509 | |||
16dc9c9da2 | |||
e30bf8d656 | |||
3cd89b6870 | |||
f33bfadd47 |
@ -1,14 +0,0 @@
|
|||||||
ignored:
|
|
||||||
# ignore apt version pinning
|
|
||||||
- DL3008
|
|
||||||
# ignore pip version pinning
|
|
||||||
- DL3013
|
|
||||||
# ignore apk version pinning
|
|
||||||
- DL3018
|
|
||||||
# ignore pipefail cause Balena/resin.io images do not work with it
|
|
||||||
- DL4006
|
|
||||||
# ignore false positive regex
|
|
||||||
- SC1083
|
|
||||||
- SC2086
|
|
||||||
# ignore as need for debug
|
|
||||||
- SC2005
|
|
37
.travis.yml
37
.travis.yml
@ -1,37 +0,0 @@
|
|||||||
dist: xenial
|
|
||||||
language: bash
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- jq
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- stage: test
|
|
||||||
script:
|
|
||||||
- git ls-files --exclude='*Dockerfile' --ignored | xargs --max-lines=1 -I{} sh -c 'docker run --rm -i -v ${PWD}/.hadolint.yaml:/.hadolint.yaml hadolint/hadolint < "$1"' -- {}
|
|
||||||
- bash -c 'shopt -s globstar; shellcheck **/*.sh'
|
|
||||||
|
|
||||||
- &build
|
|
||||||
stage: Build & update Docker HUB description
|
|
||||||
env: VERSION_SHORT=1.1 EXTRA_TAG=latest
|
|
||||||
script:
|
|
||||||
- ./build.sh $VERSION_SHORT
|
|
||||||
- <<: *build
|
|
||||||
env: VERSION_SHORT=1.0 EXTRA_TAG=stable
|
|
||||||
- <<: *build
|
|
||||||
env: VERSION_SHORT=0.18
|
|
||||||
- <<: *build
|
|
||||||
env: VERSION_SHORT=0.17
|
|
||||||
- <<: *build
|
|
||||||
env: VERSION_SHORT=0.16
|
|
||||||
- <<: *build
|
|
||||||
env: VERSION_SHORT=0.15
|
|
||||||
- <<: *build
|
|
||||||
env: VERSION_SHORT=0.14
|
|
||||||
- <<: *build
|
|
||||||
if: branch = master AND type != pull_request
|
|
||||||
script: DOCKERHUB_USERNAME=$DOCKER_USERNAME DOCKERHUB_PASSWORD=$DOCKER_PASSWORD DOCKERHUB_REPOSITORY='factoriotools/factorio' README_FILEPATH='./README.md' ./update-dockerhub-description.sh
|
|
@ -1,26 +0,0 @@
|
|||||||
FROM frolvlad/alpine-glibc:alpine-3.12
|
|
||||||
|
|
||||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
|
||||||
|
|
||||||
ENV VERSION=0.14.23 \
|
|
||||||
SHA1=6ef84341c6fc1cf45cfdd6acc8468aaa117b9e8a
|
|
||||||
|
|
||||||
RUN mkdir -p /opt \
|
|
||||||
&& apk --no-cache add curl tini pwgen \
|
|
||||||
&& curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
|
|
||||||
-o /tmp/factorio_headless_x64_$VERSION.tar.gz \
|
|
||||||
&& echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.gz" | sha1sum -c \
|
|
||||||
&& tar xzf /tmp/factorio_headless_x64_$VERSION.tar.gz --directory /opt \
|
|
||||||
&& rm /tmp/factorio_headless_x64_$VERSION.tar.gz \
|
|
||||||
&& apk del curl \
|
|
||||||
&& ln -s /factorio/saves /opt/factorio/saves \
|
|
||||||
&& ln -s /factorio/mods /opt/factorio/mods
|
|
||||||
|
|
||||||
VOLUME /factorio
|
|
||||||
|
|
||||||
EXPOSE 34197/udp 27015/tcp
|
|
||||||
|
|
||||||
COPY ./docker-entrypoint.sh /
|
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/tini", "--"]
|
|
||||||
CMD ["/docker-entrypoint.sh"]
|
|
@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
sudo docker build --no-cache -t factorio .
|
|
@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
sudo rm -rf /tmp/factorio
|
|
@ -1,35 +0,0 @@
|
|||||||
#!/bin/sh -x
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
SAVES=/factorio/saves
|
|
||||||
CONFIG=/factorio/config
|
|
||||||
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p /factorio/mods
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
|
|
||||||
if [ ! -f $CONFIG/rconpw ]; then
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/server-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/map-gen-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! find -L "$SAVES" -iname \*.zip -mindepth 1 -print | grep -q .; then
|
|
||||||
/opt/factorio/bin/x64/factorio \
|
|
||||||
--create "$SAVES/_autosave1.zip" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--port 34197 \
|
|
||||||
--start-server-load-latest \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--rcon-port 27015 \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")"
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
sudo docker run --rm -it \
|
|
||||||
-v /tmp/factorio:/factorio \
|
|
||||||
--name factorio \
|
|
||||||
factorio "$@"
|
|
||||||
find /tmp/factorio -type f
|
|
@ -1,30 +0,0 @@
|
|||||||
FROM frolvlad/alpine-glibc:alpine-3.12
|
|
||||||
|
|
||||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
|
||||||
|
|
||||||
ENV PORT=34197 \
|
|
||||||
RCON_PORT=27015 \
|
|
||||||
VERSION=0.15.40 \
|
|
||||||
SHA1=f79a975f6b8c0ee87e2fa60f7d1f7133f332c3ec
|
|
||||||
|
|
||||||
RUN mkdir -p /opt \
|
|
||||||
&& apk add --update --no-cache tini pwgen \
|
|
||||||
&& apk add --update --no-cache --virtual .build-deps curl \
|
|
||||||
&& curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
|
|
||||||
-o /tmp/factorio_headless_x64_$VERSION.tar.xz \
|
|
||||||
&& echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.xz" | sha1sum -c \
|
|
||||||
&& tar xf /tmp/factorio_headless_x64_$VERSION.tar.xz --directory /opt \
|
|
||||||
&& chmod -R ugo=rwx /opt/factorio \
|
|
||||||
&& rm /tmp/factorio_headless_x64_$VERSION.tar.xz \
|
|
||||||
&& ln -s /factorio/saves /opt/factorio/saves \
|
|
||||||
&& ln -s /factorio/mods /opt/factorio/mods \
|
|
||||||
&& apk del .build-deps
|
|
||||||
|
|
||||||
VOLUME /factorio
|
|
||||||
|
|
||||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
|
||||||
|
|
||||||
COPY ./docker-entrypoint.sh /
|
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/tini", "--"]
|
|
||||||
CMD ["/docker-entrypoint.sh"]
|
|
@ -1,8 +0,0 @@
|
|||||||
version: '2'
|
|
||||||
services:
|
|
||||||
factorio:
|
|
||||||
build: .
|
|
||||||
ports:
|
|
||||||
- "34197:34197"
|
|
||||||
volumes:
|
|
||||||
- /tmp/factorio:/factorio
|
|
@ -1,43 +0,0 @@
|
|||||||
#!/bin/sh -x
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
SAVES=/factorio/saves
|
|
||||||
CONFIG=/factorio/config
|
|
||||||
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p /factorio/mods
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/rconpw" ]; then
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/server-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/map-gen-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/map-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! find -L "$SAVES" -iname \*.zip -mindepth 1 -print | grep -q .; then
|
|
||||||
/opt/factorio/bin/x64/factorio \
|
|
||||||
--create "$SAVES/_autosave1.zip" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
|
||||||
--map-settings "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--port "$PORT" \
|
|
||||||
--start-server-load-latest \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json
|
|
@ -1,46 +0,0 @@
|
|||||||
FROM frolvlad/alpine-glibc:alpine-3.12
|
|
||||||
|
|
||||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
|
||||||
|
|
||||||
ARG USER=factorio
|
|
||||||
ARG GROUP=factorio
|
|
||||||
ARG PUID=845
|
|
||||||
ARG PGID=845
|
|
||||||
|
|
||||||
ENV PORT=34197 \
|
|
||||||
RCON_PORT=27015 \
|
|
||||||
VERSION=0.16.51 \
|
|
||||||
SHA1=127e7ff484ab263b13615d6114013ce0a66ac929 \
|
|
||||||
SAVES=/factorio/saves \
|
|
||||||
CONFIG=/factorio/config \
|
|
||||||
MODS=/factorio/mods \
|
|
||||||
SCENARIOS=/factorio/scenarios \
|
|
||||||
SCRIPTOUTPUT=/factorio/script-output \
|
|
||||||
PUID="$PUID" \
|
|
||||||
PGID="$PGID"
|
|
||||||
|
|
||||||
RUN mkdir -p /opt /factorio \
|
|
||||||
&& apk add --update --no-cache pwgen su-exec shadow \
|
|
||||||
&& apk add --update --no-cache --virtual .build-deps curl \
|
|
||||||
&& curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
|
|
||||||
-o /tmp/factorio_headless_x64_$VERSION.tar.xz \
|
|
||||||
&& echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.xz" | sha1sum -c \
|
|
||||||
&& 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 $SAVES /opt/factorio/saves \
|
|
||||||
&& ln -s $MODS /opt/factorio/mods \
|
|
||||||
&& ln -s $SCENARIOS /opt/factorio/scenarios \
|
|
||||||
&& ln -s $SCRIPTOUTPUT /opt/factorio/script-output \
|
|
||||||
&& apk del .build-deps \
|
|
||||||
&& addgroup -g $PGID -S $GROUP \
|
|
||||||
&& adduser -u $PUID -G $GROUP -s /bin/sh -SDH $USER \
|
|
||||||
&& chown -R $USER:$GROUP /opt/factorio /factorio
|
|
||||||
|
|
||||||
VOLUME /factorio
|
|
||||||
|
|
||||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
|
||||||
|
|
||||||
COPY files/ /
|
|
||||||
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
@ -1,9 +0,0 @@
|
|||||||
version: '2'
|
|
||||||
services:
|
|
||||||
factorio:
|
|
||||||
build: .
|
|
||||||
ports:
|
|
||||||
- "34197:34197/udp"
|
|
||||||
- "27015:27015/tcp"
|
|
||||||
volumes:
|
|
||||||
- /opt/factorio:/factorio
|
|
@ -1,62 +0,0 @@
|
|||||||
#!/bin/sh -x
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
id
|
|
||||||
|
|
||||||
FACTORIO_VOL=/factorio
|
|
||||||
mkdir -p "$FACTORIO_VOL"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
mkdir -p "$SCRIPTOUTPUT"
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/rconpw" ]; then
|
|
||||||
pwgen 15 1>"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/server-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/map-gen-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/map-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 -print | grep -q .; then
|
|
||||||
rm -f "$SAVES"/*.tmp.zip
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$(id -u)" = '0' ]; then
|
|
||||||
# Update the User and Group ID based on the PUID/PGID variables
|
|
||||||
usermod -o -u "$PUID" factorio
|
|
||||||
groupmod -o -g "$PGID" factorio
|
|
||||||
# Take ownership of factorio data if running as root
|
|
||||||
chown -R factorio:factorio "$FACTORIO_VOL"
|
|
||||||
# Drop to the factorio user
|
|
||||||
SU_EXEC="su-exec factorio"
|
|
||||||
else
|
|
||||||
SU_EXEC=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! find -L "$SAVES" -iname \*.zip -mindepth 1 -print | grep -q .; then
|
|
||||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
|
||||||
--create "$SAVES/_autosave1.zip" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
|
||||||
--map-settings "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
|
||||||
--port "$PORT" \
|
|
||||||
--start-server-load-latest \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json \
|
|
||||||
"$@"
|
|
@ -1,42 +0,0 @@
|
|||||||
#!/bin/sh -x
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "No argument supplied"
|
|
||||||
fi
|
|
||||||
SERVER_SCENARIO=$1
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
id
|
|
||||||
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
|
|
||||||
#chown -R factorio /factorio
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/rconpw" ]; then
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/server-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/map-gen-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/map-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--port "$PORT" \
|
|
||||||
--start-server-load-scenario "$SERVER_SCENARIO" \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json
|
|
@ -1,29 +0,0 @@
|
|||||||
#!/bin/sh -x
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "No argument supplied"
|
|
||||||
fi
|
|
||||||
SERVER_SCENARIO=$1
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
id
|
|
||||||
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/server-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/map-gen-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$CONFIG/map-settings.json" ]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--scenario2map "$SERVER_SCENARIO"
|
|
@ -1,45 +0,0 @@
|
|||||||
FROM frolvlad/alpine-glibc:alpine-3.12
|
|
||||||
|
|
||||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
|
||||||
|
|
||||||
ARG USER=factorio
|
|
||||||
ARG GROUP=factorio
|
|
||||||
ARG PUID=845
|
|
||||||
ARG PGID=845
|
|
||||||
|
|
||||||
ENV PORT=34197 \
|
|
||||||
RCON_PORT=27015 \
|
|
||||||
VERSION=0.17.79 \
|
|
||||||
SHA1=7f127baf3cf01c6e545a9ca376dec1ac37468f8a \
|
|
||||||
SAVES=/factorio/saves \
|
|
||||||
CONFIG=/factorio/config \
|
|
||||||
MODS=/factorio/mods \
|
|
||||||
SCENARIOS=/factorio/scenarios \
|
|
||||||
SCRIPTOUTPUT=/factorio/script-output \
|
|
||||||
PUID="$PUID" \
|
|
||||||
PGID="$PGID"
|
|
||||||
|
|
||||||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
|
||||||
RUN set -ox pipefail \
|
|
||||||
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
|
|
||||||
&& mkdir -p /opt /factorio \
|
|
||||||
&& apk add --update --no-cache --no-progress bash binutils curl file gettext jq libintl pwgen shadow su-exec \
|
|
||||||
&& curl -sSL "https://www.factorio.com/get-download/$VERSION/headless/linux64" -o "$archive" \
|
|
||||||
&& echo "$SHA1 $archive" | sha1sum -c \
|
|
||||||
|| (sha1sum "$archive" && file "$archive" && exit 1) \
|
|
||||||
&& tar xf "$archive" --directory /opt \
|
|
||||||
&& chmod ugo=rwx /opt/factorio \
|
|
||||||
&& rm "$archive" \
|
|
||||||
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
|
|
||||||
&& ln -s "$SAVES" /opt/factorio/saves \
|
|
||||||
&& mkdir -p /opt/factorio/config/ \
|
|
||||||
&& addgroup -g "$PGID" -S "$GROUP" \
|
|
||||||
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
|
|
||||||
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
|
|
||||||
|
|
||||||
COPY files/*.sh /
|
|
||||||
COPY files/config.ini /opt/factorio/config/config.ini
|
|
||||||
|
|
||||||
VOLUME /factorio
|
|
||||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
@ -1,15 +0,0 @@
|
|||||||
version: '2'
|
|
||||||
services:
|
|
||||||
factorio:
|
|
||||||
build: .
|
|
||||||
ports:
|
|
||||||
- "34197:34197/udp"
|
|
||||||
- "27015:27015/tcp"
|
|
||||||
volumes:
|
|
||||||
- /opt/factorio:/factorio
|
|
||||||
# environment:
|
|
||||||
# - PUID=1000
|
|
||||||
# - PGID=1000
|
|
||||||
# - UPDATE_MODS_ON_START=true
|
|
||||||
# - USERNAME=FactorioUsername
|
|
||||||
# - TOKEN=FactorioToken
|
|
@ -1,714 +0,0 @@
|
|||||||
; version=5
|
|
||||||
; This is INI file : https://en.wikipedia.org/wiki/INI_file#Format
|
|
||||||
; Semicolons (;) at the beginning of the line indicate a comment. Comment lines are ignored.
|
|
||||||
[path]
|
|
||||||
read-data=__PATH__executable__/../../data
|
|
||||||
write-data=__PATH__executable__/../..
|
|
||||||
|
|
||||||
[general]
|
|
||||||
locale=
|
|
||||||
|
|
||||||
[other]
|
|
||||||
; Options: true, false
|
|
||||||
; verbose-logging=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; log-saving-statistics=false
|
|
||||||
|
|
||||||
; autosave-interval=5
|
|
||||||
|
|
||||||
; autosave-slots=3
|
|
||||||
|
|
||||||
; In ticks
|
|
||||||
; minimum-latency-in-multiplayer=0
|
|
||||||
|
|
||||||
; In seconds
|
|
||||||
; multiplayer-initial-connection-timeout=10
|
|
||||||
|
|
||||||
; port=34197
|
|
||||||
|
|
||||||
; max-map-preview-chunk-side=64
|
|
||||||
|
|
||||||
; max-map-preview-threads=7
|
|
||||||
|
|
||||||
; In bytes
|
|
||||||
; max-multiplayer-script-reload-size=1048576
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-steam-networking=true
|
|
||||||
|
|
||||||
; proxy=
|
|
||||||
|
|
||||||
; proxy-username=
|
|
||||||
|
|
||||||
; proxy-password=
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; check-updates=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-experimental-updates=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-new-mods=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-mod-settings-per-save=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; disable-minimal-mode=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; disable-blueprint-storage=false
|
|
||||||
|
|
||||||
; Disables tracking which mod created/changed what prototype. Mainly for faster startup during development.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; disable-prototype-history=false
|
|
||||||
|
|
||||||
; Print a warning for all prototype values that were not accessed.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; check-unused-prototype-data=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-razer-chroma-support=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-logitech-led-support=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-crash-log-uploading=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-heap-validation=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-threaded-message-pump=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-taskbar-animation=true
|
|
||||||
|
|
||||||
; Does nothing on Windows
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; non-blocking-saving=false
|
|
||||||
|
|
||||||
; Related to MacOS
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; discard-mouse-events-when-accessibility-zoomed=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-blueprint-storage-cloud-sync=false
|
|
||||||
|
|
||||||
; Options: fast, maximum
|
|
||||||
; multiplayer-compression-level=fast
|
|
||||||
|
|
||||||
; Options: none, fast, maximum
|
|
||||||
; autosave-compression-level=fast
|
|
||||||
|
|
||||||
; Socket to host RCON on when lauching MP server from the menu.
|
|
||||||
; local-rcon-socket=0.0.0.0:0
|
|
||||||
|
|
||||||
; Password for RCON when launching MP server from the menu.
|
|
||||||
; local-rcon-password=
|
|
||||||
|
|
||||||
|
|
||||||
[interface]
|
|
||||||
; Options: true, false
|
|
||||||
; automatic-ui-scale=true
|
|
||||||
|
|
||||||
; custom-ui-scale=1.000000
|
|
||||||
|
|
||||||
; tooltip-delay=0.040000
|
|
||||||
|
|
||||||
; entity-tooltip-delay=0.000000
|
|
||||||
|
|
||||||
; tooltip-offset=20
|
|
||||||
|
|
||||||
; output-console-delay=1200
|
|
||||||
|
|
||||||
; train-stop-label-angle=0.085526
|
|
||||||
|
|
||||||
; active-quick-bars=2
|
|
||||||
|
|
||||||
; shortcut-bar-rows=2
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-default-logistic-filter-count-to-one=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; autosort-inventory=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; research-finished-stops-game=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-item-groups=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-item-subgroups=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-version-filter-in-browse-games-gui=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-version-filter-in-install-mods-gui=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; play-sound-for-chat-messages=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; fuzzy-search-enabled=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; pick-ghost-cursor=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-minimap=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tips-and-tricks=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tutorial-notifications=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-turret-radius-when-blueprinting=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-item-labels-in-cursor=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-rail-block-visualization=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-missing-logistic-network-icon=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-interaction-indications=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-grid-when-paused=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-arrows-when-selected=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-arrows-when-detailed-info-is-on=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-pump-arrows-when-detailed-info-is-on=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-mining-drill-arrows-when-detailed-info-is-on=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-combinator-settings-when-detailed-info-is-on=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; entity-tooltip-on-the-side=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-mod-owners-in-tooltips=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-descriptions-in-tooltips=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-total-raw-in-recipe-tooltips=true
|
|
||||||
|
|
||||||
; debug-font-size=18
|
|
||||||
|
|
||||||
; train-visualization-length=5
|
|
||||||
|
|
||||||
|
|
||||||
[sound]
|
|
||||||
; master-volume=0.600000
|
|
||||||
|
|
||||||
; music-volume=0.400000
|
|
||||||
|
|
||||||
; game-effects-volume=0.700000
|
|
||||||
|
|
||||||
; gui-effects-volume=0.700000
|
|
||||||
|
|
||||||
; walking-sound-volume=0.300000
|
|
||||||
|
|
||||||
; environment-sounds-volume=0.450000
|
|
||||||
|
|
||||||
; alerts-volume=0.550000
|
|
||||||
|
|
||||||
; wind-volume=0.400000
|
|
||||||
|
|
||||||
; audible-distance=40.000000
|
|
||||||
|
|
||||||
; environment-audible-distance=15.000000
|
|
||||||
|
|
||||||
; maximum-environment-sounds=15
|
|
||||||
|
|
||||||
; active-gui-volume-modifier=1.000000
|
|
||||||
|
|
||||||
; active-gui-environment-volume-modifier=0.600000
|
|
||||||
|
|
||||||
; ambient-music-pause-mean-seconds=45.000000
|
|
||||||
|
|
||||||
; ambient-music-pause-variance-seconds=30.000000
|
|
||||||
|
|
||||||
; Options: main-tracks-only, interleave-main-tracks-with-interludes, randomize-all
|
|
||||||
; ambient-music-mode=interleave-main-tracks-with-interludes
|
|
||||||
|
|
||||||
; zoom-audible-distance-coefficient=1.000000
|
|
||||||
|
|
||||||
; zoom-volume-coefficient=2.000000
|
|
||||||
|
|
||||||
|
|
||||||
[map-view]
|
|
||||||
; Options: true, false
|
|
||||||
; show-logistic-network=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-electric-network=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-turret-range=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-pollution=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-networkless-logistic-members=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-train-station-names=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-player-names=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-non-standard-map-info=false
|
|
||||||
|
|
||||||
|
|
||||||
[debug]
|
|
||||||
; force=enemy
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; capture-perf-statistics=false
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fps=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-detailed-info=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-time-usage=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-gpu-time-usage=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-sprite-counts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-lua-object-statistics=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-waiting-icon=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-statistics=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-selection-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-debug-info-in-tooltips=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; hide-mod-guis=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-tile-grid=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-collision-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selection-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-render-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-entity-positions=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-entity-velocities=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-entity-advanced-tiles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-input-transport-belts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-requests=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-next-waypoint-bb=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-target=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-unit-group-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-unit-behavior-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-pathfinder-fringe=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-cache=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-cache-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rolling-stock-count=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-connections=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-joints=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-signal-states=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-segment-collision-boxes=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-stop-point=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-braking-distance=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-signals=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-repathing=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-network-connected-entities=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-circuit-network-numbers=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-energy-sources-networks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-state=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-wakeup-lists=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-transport-lines=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-transport-line-gaps=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-pollution-values=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-entities-on-chunk-counts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-polluted-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-enemy-expansion-candidate-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-enemy-expansion-candidate-chunk-values=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-bad-attack-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-tile-variations=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-raw-tile-transitions=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fluid-box-fluid-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-environment-sound-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-logistic-robot-targets=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-logistic-robots-on-map=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-recipe-icons-on-map=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-player-robots=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fire-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-sticker-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-decorative-names=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-decorative-collision-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; allow-increased-zoom=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-chunk-components=never
|
|
||||||
|
|
||||||
|
|
||||||
[multiplayer-lobby]
|
|
||||||
; name=
|
|
||||||
|
|
||||||
; description=
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-public=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-steam=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-lan=true
|
|
||||||
|
|
||||||
; max-players=0
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; ignore-player-limit-when-returning=false
|
|
||||||
|
|
||||||
; max-upload-in-kilobytes-per-second=0
|
|
||||||
|
|
||||||
; max-upload-slots=5
|
|
||||||
|
|
||||||
; password=
|
|
||||||
|
|
||||||
; tag-list=
|
|
||||||
|
|
||||||
; afk-auto-kick=0
|
|
||||||
|
|
||||||
; Options: true, false, admins-only
|
|
||||||
; allowed-commands=admins-only
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; only-admins-can-pause=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; autosave-only-on-server=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; non-blocking-saving=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; verify-user-identity=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-whitelist=false
|
|
||||||
|
|
||||||
|
|
||||||
[graphics]
|
|
||||||
; lights-render-quality=0.250000
|
|
||||||
|
|
||||||
; Default preferred display index should force finding primary monitor
|
|
||||||
; preferred-display-index=255
|
|
||||||
|
|
||||||
; screenshots-threads-count=8
|
|
||||||
|
|
||||||
; cache-sprite-atlas-count=1
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; cache-sprite-atlas=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; compress-sprite-atlas-cache=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; texture-streaming=true
|
|
||||||
|
|
||||||
; streamed-atlas-physical-vram-size=0
|
|
||||||
|
|
||||||
; sprite-vertex-buffer-size=1048576
|
|
||||||
|
|
||||||
; max-texture-size=0
|
|
||||||
|
|
||||||
; max-threads=8
|
|
||||||
|
|
||||||
; 'low' and 'very-low' options are deprecated and will be migrated to 'normal'
|
|
||||||
;
|
|
||||||
; Options: high, normal, low, very-low
|
|
||||||
; graphics-quality=normal
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; full-screen=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; minimize-on-focus-loss=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-smoke=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-clouds=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-decoratives=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-item-shadows=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-shadows=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-opengl=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; v-sync=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-animations=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-shadows=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-terrain=true
|
|
||||||
|
|
||||||
; Minimum number of turrets required to turn on the turret range overdraw optimization
|
|
||||||
; turret-overdraw-minimum-count=4
|
|
||||||
|
|
||||||
; Scale at which the turret range overdraw optimization will start being applied
|
|
||||||
; turret-overdraw-scale-threshold=0.200000
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; skip-vram-detection=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; halt-rendering-when-minimized=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; runtime-sprite-reload=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; full-color-depth=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; render-in-native-resolution=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-flip-presentation-model=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; debug-api=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; discard-buffers-on-begin-frame=true
|
|
||||||
|
|
||||||
; Options: all, high, medium, low
|
|
||||||
; video-memory-usage=high
|
|
||||||
|
|
||||||
; Options: none, high-quality, low-quality
|
|
||||||
; texture-compression-level=high-quality
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; compress-virtual-atlas=true
|
|
||||||
|
|
||||||
; Options: copy, copy-sequential, flip, flip-discard
|
|
||||||
; dxgi-presentation-model=copy
|
|
||||||
|
|
||||||
; Options: none, flush, wait-for-vblank, flush-and-wait-for-vblank
|
|
||||||
; dxgi-action-before-present=none
|
|
||||||
|
|
||||||
; relevant only for flip presentation models
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; dxgi-allow-tearing=false
|
|
||||||
|
|
||||||
; Options: false, true, auto
|
|
||||||
; dxgi-flip-do-not-wait=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; dxgi-present-restart=false
|
|
||||||
|
|
||||||
; dxgi-swap-chain-buffer-count=0
|
|
||||||
|
|
||||||
; dxgi-max-frame-latency=0
|
|
||||||
|
|
||||||
; dxgi-adapter-index=-1
|
|
||||||
|
|
||||||
; max-sprite-loading-threads=32
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; gpu-accelerated-compression=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; gpu-accelerated-mipmap-compression=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; wait-until-mipmap-generation-finished=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; check-for-unused-pixels=false
|
|
||||||
|
|
||||||
; ogl-depth-buffer-bit-depth=0
|
|
||||||
|
|
||||||
; Options: false, true, auto
|
|
||||||
; ogl-accelerated-renderer=auto
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; ogl-double-buffered=true
|
|
||||||
|
|
||||||
; Set to true if mipmapped sprites render very blurry on your GPU. Limited support.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; legacy-gpu-no-mipmaps=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-linear-magnification=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; custom-mipmap-workaround=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; buffer-rename-workaround=false
|
|
||||||
|
|
||||||
; Comma separated list of OpenGL extensions that should not be used (for example: ARB_copy_image,KHR_debug)
|
|
||||||
; disabled-opengl-extensions=
|
|
||||||
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
FACTORIO_VOL=/factorio
|
|
||||||
LOAD_LATEST_SAVE="${LOAD_LATEST_SAVE:-true}"
|
|
||||||
GENERATE_NEW_SAVE="${GENERATE_NEW_SAVE:-false}"
|
|
||||||
SAVE_NAME="${SAVE_NAME:-""}"
|
|
||||||
|
|
||||||
mkdir -p "$FACTORIO_VOL"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
mkdir -p "$SCRIPTOUTPUT"
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
|
||||||
# Generate a new RCON password if none exists
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
# Copy default settings if server-settings.json doesn't exist
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
NRTMPSAVES=$( find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 | wc -l )
|
|
||||||
if [[ $NRTMPSAVES -gt 0 ]]; then
|
|
||||||
# Delete incomplete saves (such as after a forced exit)
|
|
||||||
rm -f "$SAVES"/*.tmp.zip
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${UPDATE_MODS_ON_START:-} == "true" ]]; then
|
|
||||||
./docker-update-mods.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $(id -u) = 0 ]]; then
|
|
||||||
# Update the User and Group ID based on the PUID/PGID variables
|
|
||||||
usermod -o -u "$PUID" factorio
|
|
||||||
groupmod -o -g "$PGID" factorio
|
|
||||||
# Take ownership of factorio data if running as root
|
|
||||||
chown -R factorio:factorio "$FACTORIO_VOL"
|
|
||||||
# Drop to the factorio user
|
|
||||||
SU_EXEC="su-exec factorio"
|
|
||||||
else
|
|
||||||
SU_EXEC=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
|
|
||||||
|
|
||||||
NRSAVES=$(find -L "$SAVES" -iname \*.zip -mindepth 1 | wc -l)
|
|
||||||
if [[ $GENERATE_NEW_SAVE != true && $NRSAVES == 0 ]]; then
|
|
||||||
GENERATE_NEW_SAVE=true
|
|
||||||
SAVE_NAME=_autosave1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $GENERATE_NEW_SAVE == true ]]; then
|
|
||||||
if [[ -z "$SAVE_NAME" ]]; then
|
|
||||||
echo "If \$GENERATE_NEW_SAVE is true, you must specify \$SAVE_NAME"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ -f "$SAVES/$SAVE_NAME.zip" ]]; then
|
|
||||||
echo "Map $SAVES/$SAVE_NAME.zip already exists, skipping map generation"
|
|
||||||
else
|
|
||||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
|
||||||
--create "$SAVES/$SAVE_NAME.zip" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
|
||||||
--map-settings "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
FLAGS=(\
|
|
||||||
--port "$PORT" \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--use-server-whitelist \
|
|
||||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json \
|
|
||||||
)
|
|
||||||
|
|
||||||
if [[ $LOAD_LATEST_SAVE == true ]]; then
|
|
||||||
FLAGS+=( --start-server-load-latest )
|
|
||||||
else
|
|
||||||
FLAGS+=( --start-server "$SAVE_NAME" )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
exec $SU_EXEC /opt/factorio/bin/x64/factorio "${FLAGS[@]}" "$@"
|
|
@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eou pipefail
|
|
||||||
|
|
||||||
if [[ -f /run/secrets/username ]]; then
|
|
||||||
USERNAME=$(cat /run/secrets/username)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f /run/secrets/token ]]; then
|
|
||||||
TOKEN=$(cat /run/secrets/token)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${USERNAME:-} ]]; then
|
|
||||||
USERNAME="$(jq -j ".username" "$CONFIG/server-settings.json")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${TOKEN:-} ]]; then
|
|
||||||
TOKEN="$(jq -j ".token" "$CONFIG/server-settings.json")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${USERNAME:-} ]]; then
|
|
||||||
echo "You need to provide your Factorio username to update mods."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${TOKEN:-} ]]; then
|
|
||||||
echo "You need to provide your Factorio token to update mods."
|
|
||||||
fi
|
|
||||||
|
|
||||||
./update-mods.sh "$VERSION" "$MODS" "$USERNAME" "$TOKEN"
|
|
@ -1,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
if [[ -z ${1:-} ]]; then
|
|
||||||
echo "No argument supplied"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER_SCENARIO="$1"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
|
|
||||||
#chown -R factorio /factorio
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--port "$PORT" \
|
|
||||||
--start-server-load-scenario "$SERVER_SCENARIO" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
|
||||||
--map-settings "$CONFIG/map-settings.json" \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--use-server-whitelist \
|
|
||||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
if [[ -z ${1:-} ]]; then
|
|
||||||
echo "No argument supplied"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER_SCENARIO="$1"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--scenario2map "$SERVER_SCENARIO"
|
|
@ -1,96 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eou pipefail
|
|
||||||
|
|
||||||
FACTORIO_VERSION=$1
|
|
||||||
MOD_DIR=$2
|
|
||||||
USERNAME=$3
|
|
||||||
TOKEN=$4
|
|
||||||
|
|
||||||
MOD_BASE_URL="https://mods.factorio.com"
|
|
||||||
|
|
||||||
print_step()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_success()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_failure()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
update_mod()
|
|
||||||
{
|
|
||||||
MOD_NAME="$1"
|
|
||||||
MOD_NAME_ENCODED="${1// /%20}"
|
|
||||||
|
|
||||||
print_step "Checking for update of mod $MOD_NAME..."
|
|
||||||
|
|
||||||
MOD_INFO_URL="$MOD_BASE_URL/api/mods/$MOD_NAME_ENCODED"
|
|
||||||
MOD_INFO_JSON=$(curl --silent "$MOD_INFO_URL")
|
|
||||||
|
|
||||||
if ! echo "$MOD_INFO_JSON" | jq -e .name >/dev/null; then
|
|
||||||
print_success " Custom mod not on $MOD_BASE_URL, skipped."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
MOD_INFO=$(echo "$MOD_INFO_JSON" | jq -j --arg version "$FACTORIO_VERSION" ".releases|reverse|map(select(.info_json.factorio_version as \$mod_version | \$version | startswith(\$mod_version)))[0]|.file_name, \";\", .download_url, \";\", .sha1")
|
|
||||||
|
|
||||||
MOD_FILENAME=$(echo "$MOD_INFO" | cut -f1 -d";")
|
|
||||||
MOD_URL=$(echo "$MOD_INFO" | cut -f2 -d";")
|
|
||||||
MOD_SHA1=$(echo "$MOD_INFO" | cut -f3 -d";")
|
|
||||||
|
|
||||||
if [[ $MOD_FILENAME == null ]]; then
|
|
||||||
print_failure " Not compatible with version"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_success " Already up-to-date."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
print_step "Downloading..."
|
|
||||||
FULL_URL="$MOD_BASE_URL$MOD_URL?username=$USERNAME&token=$TOKEN"
|
|
||||||
HTTP_STATUS=$(curl --silent -L -w "%{http_code}" -o "$MOD_DIR/$MOD_FILENAME" "$FULL_URL")
|
|
||||||
|
|
||||||
if [[ $HTTP_STATUS != 200 ]]; then
|
|
||||||
print_failure " Download failed: Code $HTTP_STATUS."
|
|
||||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_failure " Downloaded file missing!"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! [[ $(sha1sum "$MOD_DIR/$MOD_FILENAME") =~ $MOD_SHA1 ]]; then
|
|
||||||
print_failure " SHA1 mismatch!"
|
|
||||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
print_success " Download complete."
|
|
||||||
|
|
||||||
for file in "$MOD_DIR/${MOD_NAME}_"*".zip"; do # wildcard does usually not work in quotes: https://unix.stackexchange.com/a/67761
|
|
||||||
if [[ $file != $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_success " Deleting old version: $file"
|
|
||||||
rm -f "$file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -f $MOD_DIR/mod-list.json ]]; then
|
|
||||||
jq -r ".mods|map(select(.enabled))|.[].name" "$MOD_DIR/mod-list.json" | while read -r mod; do
|
|
||||||
if [[ $mod != base ]]; then
|
|
||||||
update_mod "$mod"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
@ -1,45 +0,0 @@
|
|||||||
FROM frolvlad/alpine-glibc:alpine-3.12
|
|
||||||
|
|
||||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
|
||||||
|
|
||||||
ARG USER=factorio
|
|
||||||
ARG GROUP=factorio
|
|
||||||
ARG PUID=845
|
|
||||||
ARG PGID=845
|
|
||||||
|
|
||||||
ENV PORT=34197 \
|
|
||||||
RCON_PORT=27015 \
|
|
||||||
VERSION=0.18.47 \
|
|
||||||
SHA1=32e23b0e83c41f6328d9270667330ee71f60837e \
|
|
||||||
SAVES=/factorio/saves \
|
|
||||||
CONFIG=/factorio/config \
|
|
||||||
MODS=/factorio/mods \
|
|
||||||
SCENARIOS=/factorio/scenarios \
|
|
||||||
SCRIPTOUTPUT=/factorio/script-output \
|
|
||||||
PUID="$PUID" \
|
|
||||||
PGID="$PGID"
|
|
||||||
|
|
||||||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
|
||||||
RUN set -ox pipefail \
|
|
||||||
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
|
|
||||||
&& mkdir -p /opt /factorio \
|
|
||||||
&& apk add --update --no-cache --no-progress bash binutils curl file gettext jq libintl pwgen shadow su-exec \
|
|
||||||
&& curl -sSL "https://www.factorio.com/get-download/$VERSION/headless/linux64" -o "$archive" \
|
|
||||||
&& echo "$SHA1 $archive" | sha1sum -c \
|
|
||||||
|| (sha1sum "$archive" && file "$archive" && exit 1) \
|
|
||||||
&& tar xf "$archive" --directory /opt \
|
|
||||||
&& chmod ugo=rwx /opt/factorio \
|
|
||||||
&& rm "$archive" \
|
|
||||||
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
|
|
||||||
&& ln -s "$SAVES" /opt/factorio/saves \
|
|
||||||
&& mkdir -p /opt/factorio/config/ \
|
|
||||||
&& addgroup -g "$PGID" -S "$GROUP" \
|
|
||||||
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
|
|
||||||
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
|
|
||||||
|
|
||||||
COPY files/*.sh /
|
|
||||||
COPY files/config.ini /opt/factorio/config/config.ini
|
|
||||||
|
|
||||||
VOLUME /factorio
|
|
||||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
@ -1,15 +0,0 @@
|
|||||||
version: '2'
|
|
||||||
services:
|
|
||||||
factorio:
|
|
||||||
build: .
|
|
||||||
ports:
|
|
||||||
- "34197:34197/udp"
|
|
||||||
- "27015:27015/tcp"
|
|
||||||
volumes:
|
|
||||||
- /opt/factorio:/factorio
|
|
||||||
# environment:
|
|
||||||
# - PUID=1000
|
|
||||||
# - PGID=1000
|
|
||||||
# - UPDATE_MODS_ON_START=true
|
|
||||||
# - USERNAME=FactorioUsername
|
|
||||||
# - TOKEN=FactorioToken
|
|
@ -1,755 +0,0 @@
|
|||||||
; version=8
|
|
||||||
; This is INI file : https://en.wikipedia.org/wiki/INI_file#Format
|
|
||||||
; Semicolons (;) at the beginning of the line indicate a comment. Comment lines are ignored.
|
|
||||||
[path]
|
|
||||||
read-data=__PATH__executable__/../../data
|
|
||||||
write-data=__PATH__executable__/../..
|
|
||||||
|
|
||||||
[general]
|
|
||||||
locale=
|
|
||||||
|
|
||||||
[other]
|
|
||||||
; Options: true, false
|
|
||||||
; verbose-logging=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; log-saving-statistics=false
|
|
||||||
|
|
||||||
; autosave-interval=5
|
|
||||||
|
|
||||||
; autosave-slots=3
|
|
||||||
|
|
||||||
; In ticks
|
|
||||||
; minimum-latency-in-multiplayer=0
|
|
||||||
|
|
||||||
; In seconds
|
|
||||||
; multiplayer-initial-connection-timeout=10
|
|
||||||
|
|
||||||
; port=34197
|
|
||||||
|
|
||||||
; max-map-preview-chunk-side=64
|
|
||||||
|
|
||||||
; max-map-preview-threads=7
|
|
||||||
|
|
||||||
; In bytes
|
|
||||||
; max-multiplayer-script-reload-size=1048576
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-steam-networking=true
|
|
||||||
|
|
||||||
; proxy=
|
|
||||||
|
|
||||||
; proxy-username=
|
|
||||||
|
|
||||||
; proxy-password=
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; check-updates=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-experimental-updates=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-new-mods=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-mod-settings-per-save=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; disable-minimal-mode=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; disable-blueprint-storage=false
|
|
||||||
|
|
||||||
; Disables tracking which mod created/changed what prototype. Mainly for faster startup during development.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; disable-prototype-history=false
|
|
||||||
|
|
||||||
; Print a warning for all prototype values that were not accessed.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; check-unused-prototype-data=false
|
|
||||||
|
|
||||||
; Cache data stage prototype data for faster startup. Experimental.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; cache-prototype-data=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-razer-chroma-support=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-logitech-led-support=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-crash-log-uploading=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-heap-validation=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-threaded-message-pump=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-taskbar-animation=true
|
|
||||||
|
|
||||||
; Does nothing on Windows
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; non-blocking-saving=false
|
|
||||||
|
|
||||||
; Related to MacOS
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; discard-mouse-events-when-accessibility-zoomed=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-blueprint-storage-cloud-sync=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-enable-factorio-version-check=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; bring-window-to-top-on-click=true
|
|
||||||
|
|
||||||
; Options: fast, maximum
|
|
||||||
; multiplayer-compression-level=fast
|
|
||||||
|
|
||||||
; Options: none, fast, maximum
|
|
||||||
; autosave-compression-level=fast
|
|
||||||
|
|
||||||
; Socket to host RCON on when lauching MP server from the menu.
|
|
||||||
; local-rcon-socket=0.0.0.0:0
|
|
||||||
|
|
||||||
; Password for RCON when launching MP server from the menu.
|
|
||||||
; local-rcon-password=
|
|
||||||
|
|
||||||
|
|
||||||
[interface]
|
|
||||||
; Options: true, false
|
|
||||||
; automatic-ui-scale=true
|
|
||||||
|
|
||||||
; custom-ui-scale=1.000000
|
|
||||||
|
|
||||||
; tooltip-delay=0.040000
|
|
||||||
|
|
||||||
; entity-tooltip-delay=0.000000
|
|
||||||
|
|
||||||
; tooltip-offset=20
|
|
||||||
|
|
||||||
; output-console-delay=1200
|
|
||||||
|
|
||||||
; train-stop-label-angle=0.085526
|
|
||||||
|
|
||||||
; active-quick-bars=2
|
|
||||||
|
|
||||||
; shortcut-bar-rows=2
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; autosort-inventory=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; research-finished-stops-game=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-item-groups=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-item-subgroups=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-version-filter-in-browse-games-gui=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-version-filter-in-install-mods-gui=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; play-sound-for-chat-messages=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; fuzzy-search-enabled=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; pick-ghost-cursor=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-minimap=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tips-and-tricks=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tutorial-notifications=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-turret-radius-when-blueprinting=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-item-labels-in-cursor=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-rail-block-visualization=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-missing-logistic-network-icon=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-interaction-indications=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-grid-when-paused=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-arrows-when-selected=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-arrows-when-detailed-info-is-on=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-pump-arrows-when-detailed-info-is-on=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-mining-drill-arrows-when-detailed-info-is-on=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-combinator-settings-when-detailed-info-is-on=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; entity-tooltip-on-the-side=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-mod-owners-in-tooltips=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-descriptions-in-tooltips=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-total-raw-in-recipe-tooltips=true
|
|
||||||
|
|
||||||
; debug-font-size=18
|
|
||||||
|
|
||||||
; train-visualization-length=5
|
|
||||||
|
|
||||||
|
|
||||||
[sound]
|
|
||||||
; master-volume=0.800000
|
|
||||||
|
|
||||||
; music-volume=0.500000
|
|
||||||
|
|
||||||
; game-effects-volume=0.700000
|
|
||||||
|
|
||||||
; gui-effects-volume=0.600000
|
|
||||||
|
|
||||||
; walking-sound-volume=0.250000
|
|
||||||
|
|
||||||
; environment-sounds-volume=0.550000
|
|
||||||
|
|
||||||
; alerts-volume=0.500000
|
|
||||||
|
|
||||||
; wind-volume=0.350000
|
|
||||||
|
|
||||||
; audible-distance=40.000000
|
|
||||||
|
|
||||||
; environment-audible-distance=30.000000
|
|
||||||
|
|
||||||
; maximum-environment-sounds=50
|
|
||||||
|
|
||||||
; active-gui-volume-modifier=0.800000
|
|
||||||
|
|
||||||
; active-gui-environment-volume-modifier=0.400000
|
|
||||||
|
|
||||||
; The maximum volume allowed for any sound.
|
|
||||||
; maximum-volume=2.000000
|
|
||||||
|
|
||||||
; ambient-music-pause-mean-seconds=45.000000
|
|
||||||
|
|
||||||
; ambient-music-pause-variance-seconds=30.000000
|
|
||||||
|
|
||||||
; Options: main-tracks-only, interleave-main-tracks-with-interludes, randomize-all
|
|
||||||
; ambient-music-mode=interleave-main-tracks-with-interludes
|
|
||||||
|
|
||||||
; zoom-audible-distance-coefficient=0.500000
|
|
||||||
|
|
||||||
; zoom-volume-coefficient=0.750000
|
|
||||||
|
|
||||||
|
|
||||||
[map-view]
|
|
||||||
; Options: true, false
|
|
||||||
; show-logistic-network=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-electric-network=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-turret-range=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-pollution=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-networkless-logistic-members=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-train-station-names=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-player-names=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-non-standard-map-info=false
|
|
||||||
|
|
||||||
|
|
||||||
[debug]
|
|
||||||
; force=enemy
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; capture-perf-statistics=false
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fps=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-detailed-info=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-time-usage=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-gpu-time-usage=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-sprite-counts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-lua-object-statistics=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-heat-buffer-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-waiting-icon=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-statistics=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-selection-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-debug-info-in-tooltips=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; hide-mod-guis=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-tile-grid=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-collision-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selection-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-render-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-entity-positions=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-entity-velocities=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-entity-advanced-tiles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-input-transport-belts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-requests=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-next-waypoint-bb=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-target=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-unit-group-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-unit-behavior-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-pathfinder-fringe=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-cache=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-cache-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rolling-stock-count=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-connections=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-joints=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-signal-states=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-segment-collision-boxes=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-stop-point=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-braking-distance=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-signals=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-repathing=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-network-connected-entities=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-circuit-network-numbers=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-energy-sources-networks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-state=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-wakeup-lists=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-transport-lines=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-transport-line-gaps=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-pollution-values=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-entities-on-chunk-counts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-polluted-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; hide-chart-tags=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-enemy-expansion-candidate-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-enemy-expansion-candidate-chunk-values=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-bad-attack-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-tile-variations=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-raw-tile-transitions=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fluid-box-fluid-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-environment-sound-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-environment-sound-area=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-entity-audible-range=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-recently-played-sound-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-logistic-robot-targets=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-logistic-robots-on-map=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-recipe-icons-on-map=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-player-robots=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fire-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-sticker-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-decorative-names=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-decorative-collision-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; allow-increased-zoom=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-chunk-components=never
|
|
||||||
|
|
||||||
|
|
||||||
[multiplayer-lobby]
|
|
||||||
; name=
|
|
||||||
|
|
||||||
; description=
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-public=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-steam=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-lan=true
|
|
||||||
|
|
||||||
; max-players=0
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; ignore-player-limit-when-returning=false
|
|
||||||
|
|
||||||
; max-upload-in-kilobytes-per-second=0
|
|
||||||
|
|
||||||
; max-upload-slots=5
|
|
||||||
|
|
||||||
; password=
|
|
||||||
|
|
||||||
; tag-list=
|
|
||||||
|
|
||||||
; afk-auto-kick=0
|
|
||||||
|
|
||||||
; Options: true, false, admins-only
|
|
||||||
; allowed-commands=admins-only
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; only-admins-can-pause=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; autosave-only-on-server=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; non-blocking-saving=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; verify-user-identity=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-whitelist=false
|
|
||||||
|
|
||||||
|
|
||||||
[graphics]
|
|
||||||
; lights-render-quality=0.250000
|
|
||||||
|
|
||||||
; Default preferred display index should force finding primary monitor
|
|
||||||
; preferred-display-index=255
|
|
||||||
|
|
||||||
; screenshots-threads-count=8
|
|
||||||
|
|
||||||
; cache-sprite-atlas-count=1
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; cache-sprite-atlas=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; compress-sprite-atlas-cache=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; texture-streaming=true
|
|
||||||
|
|
||||||
; streamed-atlas-physical-vram-size=0
|
|
||||||
|
|
||||||
; sprite-vertex-buffer-size=1048576
|
|
||||||
|
|
||||||
; max-texture-size=0
|
|
||||||
|
|
||||||
; max-threads=8
|
|
||||||
|
|
||||||
; 'low' and 'very-low' options are deprecated and will be migrated to 'normal'
|
|
||||||
;
|
|
||||||
; Options: high, normal, low, very-low
|
|
||||||
; graphics-quality=normal
|
|
||||||
|
|
||||||
; brightness=0
|
|
||||||
|
|
||||||
; contrast=0
|
|
||||||
|
|
||||||
; saturation=100
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; full-screen=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; minimize-on-focus-loss=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-smoke=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-clouds=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-decoratives=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-particles=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-item-shadows=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-shadows=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-animated-water=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tree-distortion=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-opengl=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; v-sync=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-animations=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-shadows=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-terrain=true
|
|
||||||
|
|
||||||
; Minimum number of turrets required to turn on the turret range overdraw optimization
|
|
||||||
; turret-overdraw-minimum-count=4
|
|
||||||
|
|
||||||
; Scale at which the turret range overdraw optimization will start being applied
|
|
||||||
; turret-overdraw-scale-threshold=0.200000
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; skip-vram-detection=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; halt-rendering-when-minimized=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; runtime-sprite-reload=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; full-color-depth=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; render-in-native-resolution=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-flip-presentation-model=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; debug-api=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; discard-buffers-on-begin-frame=true
|
|
||||||
|
|
||||||
; Options: all, high, medium, low
|
|
||||||
; video-memory-usage=high
|
|
||||||
|
|
||||||
; Options: none, high-quality, low-quality
|
|
||||||
; texture-compression-level=high-quality
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; compress-virtual-atlas=true
|
|
||||||
|
|
||||||
; Options: copy, copy-sequential, flip, flip-discard
|
|
||||||
; dxgi-presentation-model=copy
|
|
||||||
|
|
||||||
; Options: none, flush, wait-for-vblank, flush-and-wait-for-vblank
|
|
||||||
; dxgi-action-before-present=none
|
|
||||||
|
|
||||||
; relevant only for flip presentation models
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; dxgi-allow-tearing=false
|
|
||||||
|
|
||||||
; Options: false, true, auto
|
|
||||||
; dxgi-flip-do-not-wait=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; dxgi-present-restart=false
|
|
||||||
|
|
||||||
; dxgi-swap-chain-buffer-count=0
|
|
||||||
|
|
||||||
; dxgi-max-frame-latency=0
|
|
||||||
|
|
||||||
; dxgi-adapter-index=-1
|
|
||||||
|
|
||||||
; max-sprite-loading-threads=32
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; gpu-accelerated-compression=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; gpu-accelerated-mipmap-compression=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; wait-until-mipmap-generation-finished=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; check-for-unused-pixels=false
|
|
||||||
|
|
||||||
; ogl-depth-buffer-bit-depth=0
|
|
||||||
|
|
||||||
; Options: false, true, auto
|
|
||||||
; ogl-accelerated-renderer=auto
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; ogl-double-buffered=true
|
|
||||||
|
|
||||||
; Set to true if mipmapped sprites render very blurry on your GPU. Limited support.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; legacy-gpu-no-mipmaps=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-linear-magnification=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; custom-mipmap-workaround=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; buffer-rename-workaround=false
|
|
||||||
|
|
||||||
; Comma separated list of OpenGL extensions that should not be used (for example: ARB_copy_image,KHR_debug)
|
|
||||||
; disabled-opengl-extensions=
|
|
||||||
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
FACTORIO_VOL=/factorio
|
|
||||||
LOAD_LATEST_SAVE="${LOAD_LATEST_SAVE:-true}"
|
|
||||||
GENERATE_NEW_SAVE="${GENERATE_NEW_SAVE:-false}"
|
|
||||||
SAVE_NAME="${SAVE_NAME:-""}"
|
|
||||||
|
|
||||||
mkdir -p "$FACTORIO_VOL"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
mkdir -p "$SCRIPTOUTPUT"
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
|
||||||
# Generate a new RCON password if none exists
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
# Copy default settings if server-settings.json doesn't exist
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
NRTMPSAVES=$( find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 | wc -l )
|
|
||||||
if [[ $NRTMPSAVES -gt 0 ]]; then
|
|
||||||
# Delete incomplete saves (such as after a forced exit)
|
|
||||||
rm -f "$SAVES"/*.tmp.zip
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${UPDATE_MODS_ON_START:-} == "true" ]]; then
|
|
||||||
./docker-update-mods.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $(id -u) = 0 ]]; then
|
|
||||||
# Update the User and Group ID based on the PUID/PGID variables
|
|
||||||
usermod -o -u "$PUID" factorio
|
|
||||||
groupmod -o -g "$PGID" factorio
|
|
||||||
# Take ownership of factorio data if running as root
|
|
||||||
chown -R factorio:factorio "$FACTORIO_VOL"
|
|
||||||
# Drop to the factorio user
|
|
||||||
SU_EXEC="su-exec factorio"
|
|
||||||
else
|
|
||||||
SU_EXEC=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
|
|
||||||
|
|
||||||
NRSAVES=$(find -L "$SAVES" -iname \*.zip -mindepth 1 | wc -l)
|
|
||||||
if [[ $GENERATE_NEW_SAVE != true && $NRSAVES == 0 ]]; then
|
|
||||||
GENERATE_NEW_SAVE=true
|
|
||||||
SAVE_NAME=_autosave1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $GENERATE_NEW_SAVE == true ]]; then
|
|
||||||
if [[ -z "$SAVE_NAME" ]]; then
|
|
||||||
echo "If \$GENERATE_NEW_SAVE is true, you must specify \$SAVE_NAME"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ -f "$SAVES/$SAVE_NAME.zip" ]]; then
|
|
||||||
echo "Map $SAVES/$SAVE_NAME.zip already exists, skipping map generation"
|
|
||||||
else
|
|
||||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
|
||||||
--create "$SAVES/$SAVE_NAME.zip" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
|
||||||
--map-settings "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
FLAGS=(\
|
|
||||||
--port "$PORT" \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--use-server-whitelist \
|
|
||||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json \
|
|
||||||
)
|
|
||||||
|
|
||||||
if [[ $LOAD_LATEST_SAVE == true ]]; then
|
|
||||||
FLAGS+=( --start-server-load-latest )
|
|
||||||
else
|
|
||||||
FLAGS+=( --start-server "$SAVE_NAME" )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
exec $SU_EXEC /opt/factorio/bin/x64/factorio "${FLAGS[@]}" "$@"
|
|
@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eou pipefail
|
|
||||||
|
|
||||||
if [[ -f /run/secrets/username ]]; then
|
|
||||||
USERNAME=$(cat /run/secrets/username)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f /run/secrets/token ]]; then
|
|
||||||
TOKEN=$(cat /run/secrets/token)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${USERNAME:-} ]]; then
|
|
||||||
USERNAME="$(jq -j ".username" "$CONFIG/server-settings.json")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${TOKEN:-} ]]; then
|
|
||||||
TOKEN="$(jq -j ".token" "$CONFIG/server-settings.json")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${USERNAME:-} ]]; then
|
|
||||||
echo "You need to provide your Factorio username to update mods."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${TOKEN:-} ]]; then
|
|
||||||
echo "You need to provide your Factorio token to update mods."
|
|
||||||
fi
|
|
||||||
|
|
||||||
./update-mods.sh "$VERSION" "$MODS" "$USERNAME" "$TOKEN"
|
|
@ -1,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
if [[ -z ${1:-} ]]; then
|
|
||||||
echo "No argument supplied"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER_SCENARIO="$1"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
|
|
||||||
#chown -R factorio /factorio
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--port "$PORT" \
|
|
||||||
--start-server-load-scenario "$SERVER_SCENARIO" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
|
||||||
--map-settings "$CONFIG/map-settings.json" \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--use-server-whitelist \
|
|
||||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
if [[ -z ${1:-} ]]; then
|
|
||||||
echo "No argument supplied"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER_SCENARIO="$1"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--scenario2map "$SERVER_SCENARIO"
|
|
@ -1,96 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eou pipefail
|
|
||||||
|
|
||||||
FACTORIO_VERSION=$1
|
|
||||||
MOD_DIR=$2
|
|
||||||
USERNAME=$3
|
|
||||||
TOKEN=$4
|
|
||||||
|
|
||||||
MOD_BASE_URL="https://mods.factorio.com"
|
|
||||||
|
|
||||||
print_step()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_success()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_failure()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
update_mod()
|
|
||||||
{
|
|
||||||
MOD_NAME="$1"
|
|
||||||
MOD_NAME_ENCODED="${1// /%20}"
|
|
||||||
|
|
||||||
print_step "Checking for update of mod $MOD_NAME..."
|
|
||||||
|
|
||||||
MOD_INFO_URL="$MOD_BASE_URL/api/mods/$MOD_NAME_ENCODED"
|
|
||||||
MOD_INFO_JSON=$(curl --silent "$MOD_INFO_URL")
|
|
||||||
|
|
||||||
if ! echo "$MOD_INFO_JSON" | jq -e .name >/dev/null; then
|
|
||||||
print_success " Custom mod not on $MOD_BASE_URL, skipped."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
MOD_INFO=$(echo "$MOD_INFO_JSON" | jq -j --arg version "$FACTORIO_VERSION" ".releases|reverse|map(select(.info_json.factorio_version as \$mod_version | \$version | startswith(\$mod_version)))[0]|.file_name, \";\", .download_url, \";\", .sha1")
|
|
||||||
|
|
||||||
MOD_FILENAME=$(echo "$MOD_INFO" | cut -f1 -d";")
|
|
||||||
MOD_URL=$(echo "$MOD_INFO" | cut -f2 -d";")
|
|
||||||
MOD_SHA1=$(echo "$MOD_INFO" | cut -f3 -d";")
|
|
||||||
|
|
||||||
if [[ $MOD_FILENAME == null ]]; then
|
|
||||||
print_failure " Not compatible with version"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_success " Already up-to-date."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
print_step "Downloading..."
|
|
||||||
FULL_URL="$MOD_BASE_URL$MOD_URL?username=$USERNAME&token=$TOKEN"
|
|
||||||
HTTP_STATUS=$(curl --silent -L -w "%{http_code}" -o "$MOD_DIR/$MOD_FILENAME" "$FULL_URL")
|
|
||||||
|
|
||||||
if [[ $HTTP_STATUS != 200 ]]; then
|
|
||||||
print_failure " Download failed: Code $HTTP_STATUS."
|
|
||||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_failure " Downloaded file missing!"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! [[ $(sha1sum "$MOD_DIR/$MOD_FILENAME") =~ $MOD_SHA1 ]]; then
|
|
||||||
print_failure " SHA1 mismatch!"
|
|
||||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
print_success " Download complete."
|
|
||||||
|
|
||||||
for file in "$MOD_DIR/${MOD_NAME}_"*".zip"; do # wildcard does usually not work in quotes: https://unix.stackexchange.com/a/67761
|
|
||||||
if [[ $file != $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_success " Deleting old version: $file"
|
|
||||||
rm -f "$file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -f $MOD_DIR/mod-list.json ]]; then
|
|
||||||
jq -r ".mods|map(select(.enabled))|.[].name" "$MOD_DIR/mod-list.json" | while read -r mod; do
|
|
||||||
if [[ $mod != base ]]; then
|
|
||||||
update_mod "$mod"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
@ -1,45 +0,0 @@
|
|||||||
FROM frolvlad/alpine-glibc:alpine-3.12
|
|
||||||
|
|
||||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
|
||||||
|
|
||||||
ARG USER=factorio
|
|
||||||
ARG GROUP=factorio
|
|
||||||
ARG PUID=845
|
|
||||||
ARG PGID=845
|
|
||||||
|
|
||||||
ENV PORT=34197 \
|
|
||||||
RCON_PORT=27015 \
|
|
||||||
VERSION=1.0.0 \
|
|
||||||
SHA1=a50dd6f1ab17acde5a8d77bc5fb478c798d9c20e \
|
|
||||||
SAVES=/factorio/saves \
|
|
||||||
CONFIG=/factorio/config \
|
|
||||||
MODS=/factorio/mods \
|
|
||||||
SCENARIOS=/factorio/scenarios \
|
|
||||||
SCRIPTOUTPUT=/factorio/script-output \
|
|
||||||
PUID="$PUID" \
|
|
||||||
PGID="$PGID"
|
|
||||||
|
|
||||||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
|
||||||
RUN set -ox pipefail \
|
|
||||||
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
|
|
||||||
&& mkdir -p /opt /factorio \
|
|
||||||
&& apk add --update --no-cache --no-progress bash binutils curl file gettext jq libintl pwgen shadow su-exec \
|
|
||||||
&& curl -sSL "https://www.factorio.com/get-download/$VERSION/headless/linux64" -o "$archive" \
|
|
||||||
&& echo "$SHA1 $archive" | sha1sum -c \
|
|
||||||
|| (sha1sum "$archive" && file "$archive" && exit 1) \
|
|
||||||
&& tar xf "$archive" --directory /opt \
|
|
||||||
&& chmod ugo=rwx /opt/factorio \
|
|
||||||
&& rm "$archive" \
|
|
||||||
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
|
|
||||||
&& ln -s "$SAVES" /opt/factorio/saves \
|
|
||||||
&& mkdir -p /opt/factorio/config/ \
|
|
||||||
&& addgroup -g "$PGID" -S "$GROUP" \
|
|
||||||
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
|
|
||||||
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
|
|
||||||
|
|
||||||
COPY files/*.sh /
|
|
||||||
COPY files/config.ini /opt/factorio/config/config.ini
|
|
||||||
|
|
||||||
VOLUME /factorio
|
|
||||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
@ -1,16 +0,0 @@
|
|||||||
version: '2'
|
|
||||||
services:
|
|
||||||
factorio:
|
|
||||||
build: .
|
|
||||||
ports:
|
|
||||||
- "34197:34197/udp"
|
|
||||||
- "27015:27015/tcp"
|
|
||||||
volumes:
|
|
||||||
- /opt/factorio:/factorio
|
|
||||||
# environment:
|
|
||||||
# - PUID=1000
|
|
||||||
# - PGID=1000
|
|
||||||
# - UPDATE_MODS_ON_START=true
|
|
||||||
# - USERNAME=FactorioUsername
|
|
||||||
# - TOKEN=FactorioToken
|
|
||||||
# - PORT=34198
|
|
@ -1,755 +0,0 @@
|
|||||||
; version=8
|
|
||||||
; This is INI file : https://en.wikipedia.org/wiki/INI_file#Format
|
|
||||||
; Semicolons (;) at the beginning of the line indicate a comment. Comment lines are ignored.
|
|
||||||
[path]
|
|
||||||
read-data=__PATH__executable__/../../data
|
|
||||||
write-data=__PATH__executable__/../..
|
|
||||||
|
|
||||||
[general]
|
|
||||||
locale=
|
|
||||||
|
|
||||||
[other]
|
|
||||||
; Options: true, false
|
|
||||||
; verbose-logging=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; log-saving-statistics=false
|
|
||||||
|
|
||||||
; autosave-interval=5
|
|
||||||
|
|
||||||
; autosave-slots=3
|
|
||||||
|
|
||||||
; In ticks
|
|
||||||
; minimum-latency-in-multiplayer=0
|
|
||||||
|
|
||||||
; In seconds
|
|
||||||
; multiplayer-initial-connection-timeout=10
|
|
||||||
|
|
||||||
; port=34197
|
|
||||||
|
|
||||||
; max-map-preview-chunk-side=64
|
|
||||||
|
|
||||||
; max-map-preview-threads=7
|
|
||||||
|
|
||||||
; In bytes
|
|
||||||
; max-multiplayer-script-reload-size=1048576
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-steam-networking=true
|
|
||||||
|
|
||||||
; proxy=
|
|
||||||
|
|
||||||
; proxy-username=
|
|
||||||
|
|
||||||
; proxy-password=
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; check-updates=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-experimental-updates=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-new-mods=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-mod-settings-per-save=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; disable-minimal-mode=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; disable-blueprint-storage=false
|
|
||||||
|
|
||||||
; Disables tracking which mod created/changed what prototype. Mainly for faster startup during development.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; disable-prototype-history=false
|
|
||||||
|
|
||||||
; Print a warning for all prototype values that were not accessed.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; check-unused-prototype-data=false
|
|
||||||
|
|
||||||
; Cache data stage prototype data for faster startup. Experimental.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; cache-prototype-data=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-razer-chroma-support=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-logitech-led-support=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-crash-log-uploading=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-heap-validation=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-threaded-message-pump=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-taskbar-animation=true
|
|
||||||
|
|
||||||
; Does nothing on Windows
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; non-blocking-saving=false
|
|
||||||
|
|
||||||
; Related to MacOS
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; discard-mouse-events-when-accessibility-zoomed=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-blueprint-storage-cloud-sync=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-enable-factorio-version-check=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; bring-window-to-top-on-click=true
|
|
||||||
|
|
||||||
; Options: fast, maximum
|
|
||||||
; multiplayer-compression-level=fast
|
|
||||||
|
|
||||||
; Options: none, fast, maximum
|
|
||||||
; autosave-compression-level=fast
|
|
||||||
|
|
||||||
; Socket to host RCON on when lauching MP server from the menu.
|
|
||||||
; local-rcon-socket=0.0.0.0:0
|
|
||||||
|
|
||||||
; Password for RCON when launching MP server from the menu.
|
|
||||||
; local-rcon-password=
|
|
||||||
|
|
||||||
|
|
||||||
[interface]
|
|
||||||
; Options: true, false
|
|
||||||
; automatic-ui-scale=true
|
|
||||||
|
|
||||||
; custom-ui-scale=1.000000
|
|
||||||
|
|
||||||
; tooltip-delay=0.040000
|
|
||||||
|
|
||||||
; entity-tooltip-delay=0.000000
|
|
||||||
|
|
||||||
; tooltip-offset=20
|
|
||||||
|
|
||||||
; output-console-delay=1200
|
|
||||||
|
|
||||||
; train-stop-label-angle=0.085526
|
|
||||||
|
|
||||||
; active-quick-bars=2
|
|
||||||
|
|
||||||
; shortcut-bar-rows=2
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; autosort-inventory=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; research-finished-stops-game=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-item-groups=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-item-subgroups=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-version-filter-in-browse-games-gui=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-version-filter-in-install-mods-gui=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; play-sound-for-chat-messages=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; fuzzy-search-enabled=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; pick-ghost-cursor=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-minimap=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tips-and-tricks=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tutorial-notifications=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-turret-radius-when-blueprinting=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-item-labels-in-cursor=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-rail-block-visualization=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-missing-logistic-network-icon=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-interaction-indications=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-grid-when-paused=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-arrows-when-selected=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-arrows-when-detailed-info-is-on=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-pump-arrows-when-detailed-info-is-on=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-mining-drill-arrows-when-detailed-info-is-on=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-combinator-settings-when-detailed-info-is-on=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; entity-tooltip-on-the-side=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-mod-owners-in-tooltips=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-descriptions-in-tooltips=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-total-raw-in-recipe-tooltips=true
|
|
||||||
|
|
||||||
; debug-font-size=18
|
|
||||||
|
|
||||||
; train-visualization-length=5
|
|
||||||
|
|
||||||
|
|
||||||
[sound]
|
|
||||||
; master-volume=0.800000
|
|
||||||
|
|
||||||
; music-volume=0.500000
|
|
||||||
|
|
||||||
; game-effects-volume=0.700000
|
|
||||||
|
|
||||||
; gui-effects-volume=0.600000
|
|
||||||
|
|
||||||
; walking-sound-volume=0.250000
|
|
||||||
|
|
||||||
; environment-sounds-volume=0.550000
|
|
||||||
|
|
||||||
; alerts-volume=0.500000
|
|
||||||
|
|
||||||
; wind-volume=0.350000
|
|
||||||
|
|
||||||
; audible-distance=40.000000
|
|
||||||
|
|
||||||
; environment-audible-distance=30.000000
|
|
||||||
|
|
||||||
; maximum-environment-sounds=50
|
|
||||||
|
|
||||||
; active-gui-volume-modifier=0.800000
|
|
||||||
|
|
||||||
; active-gui-environment-volume-modifier=0.400000
|
|
||||||
|
|
||||||
; The maximum volume allowed for any sound.
|
|
||||||
; maximum-volume=2.000000
|
|
||||||
|
|
||||||
; ambient-music-pause-mean-seconds=45.000000
|
|
||||||
|
|
||||||
; ambient-music-pause-variance-seconds=30.000000
|
|
||||||
|
|
||||||
; Options: main-tracks-only, interleave-main-tracks-with-interludes, randomize-all
|
|
||||||
; ambient-music-mode=interleave-main-tracks-with-interludes
|
|
||||||
|
|
||||||
; zoom-audible-distance-coefficient=0.500000
|
|
||||||
|
|
||||||
; zoom-volume-coefficient=0.750000
|
|
||||||
|
|
||||||
|
|
||||||
[map-view]
|
|
||||||
; Options: true, false
|
|
||||||
; show-logistic-network=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-electric-network=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-turret-range=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-pollution=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-networkless-logistic-members=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-train-station-names=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-player-names=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-non-standard-map-info=false
|
|
||||||
|
|
||||||
|
|
||||||
[debug]
|
|
||||||
; force=enemy
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; capture-perf-statistics=false
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fps=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-detailed-info=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-time-usage=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-gpu-time-usage=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-sprite-counts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-lua-object-statistics=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-heat-buffer-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-waiting-icon=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-statistics=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-selection-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-debug-info-in-tooltips=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; hide-mod-guis=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-tile-grid=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-collision-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selection-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-render-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-entity-positions=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-entity-velocities=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-entity-advanced-tiles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-input-transport-belts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-requests=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-next-waypoint-bb=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-target=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-unit-group-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-unit-behavior-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-pathfinder-fringe=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-cache=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-cache-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rolling-stock-count=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-connections=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-joints=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-signal-states=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-segment-collision-boxes=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-stop-point=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-braking-distance=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-signals=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-repathing=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-network-connected-entities=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-circuit-network-numbers=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-energy-sources-networks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-state=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-wakeup-lists=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-transport-lines=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-transport-line-gaps=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-pollution-values=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-entities-on-chunk-counts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-polluted-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; hide-chart-tags=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-enemy-expansion-candidate-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-enemy-expansion-candidate-chunk-values=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-bad-attack-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-tile-variations=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-raw-tile-transitions=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fluid-box-fluid-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-environment-sound-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-environment-sound-area=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-entity-audible-range=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-recently-played-sound-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-logistic-robot-targets=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-logistic-robots-on-map=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-recipe-icons-on-map=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-player-robots=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fire-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-sticker-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-decorative-names=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-decorative-collision-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; allow-increased-zoom=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-chunk-components=never
|
|
||||||
|
|
||||||
|
|
||||||
[multiplayer-lobby]
|
|
||||||
; name=
|
|
||||||
|
|
||||||
; description=
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-public=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-steam=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-lan=true
|
|
||||||
|
|
||||||
; max-players=0
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; ignore-player-limit-when-returning=false
|
|
||||||
|
|
||||||
; max-upload-in-kilobytes-per-second=0
|
|
||||||
|
|
||||||
; max-upload-slots=5
|
|
||||||
|
|
||||||
; password=
|
|
||||||
|
|
||||||
; tag-list=
|
|
||||||
|
|
||||||
; afk-auto-kick=0
|
|
||||||
|
|
||||||
; Options: true, false, admins-only
|
|
||||||
; allowed-commands=admins-only
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; only-admins-can-pause=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; autosave-only-on-server=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; non-blocking-saving=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; verify-user-identity=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-whitelist=false
|
|
||||||
|
|
||||||
|
|
||||||
[graphics]
|
|
||||||
; lights-render-quality=0.250000
|
|
||||||
|
|
||||||
; Default preferred display index should force finding primary monitor
|
|
||||||
; preferred-display-index=255
|
|
||||||
|
|
||||||
; screenshots-threads-count=8
|
|
||||||
|
|
||||||
; cache-sprite-atlas-count=1
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; cache-sprite-atlas=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; compress-sprite-atlas-cache=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; texture-streaming=true
|
|
||||||
|
|
||||||
; streamed-atlas-physical-vram-size=0
|
|
||||||
|
|
||||||
; sprite-vertex-buffer-size=1048576
|
|
||||||
|
|
||||||
; max-texture-size=0
|
|
||||||
|
|
||||||
; max-threads=8
|
|
||||||
|
|
||||||
; 'low' and 'very-low' options are deprecated and will be migrated to 'normal'
|
|
||||||
;
|
|
||||||
; Options: high, normal, low, very-low
|
|
||||||
; graphics-quality=normal
|
|
||||||
|
|
||||||
; brightness=0
|
|
||||||
|
|
||||||
; contrast=0
|
|
||||||
|
|
||||||
; saturation=100
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; full-screen=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; minimize-on-focus-loss=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-smoke=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-clouds=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-decoratives=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-particles=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-item-shadows=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-shadows=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-animated-water=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tree-distortion=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-opengl=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; v-sync=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-animations=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-shadows=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-terrain=true
|
|
||||||
|
|
||||||
; Minimum number of turrets required to turn on the turret range overdraw optimization
|
|
||||||
; turret-overdraw-minimum-count=4
|
|
||||||
|
|
||||||
; Scale at which the turret range overdraw optimization will start being applied
|
|
||||||
; turret-overdraw-scale-threshold=0.200000
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; skip-vram-detection=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; halt-rendering-when-minimized=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; runtime-sprite-reload=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; full-color-depth=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; render-in-native-resolution=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-flip-presentation-model=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; debug-api=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; discard-buffers-on-begin-frame=true
|
|
||||||
|
|
||||||
; Options: all, high, medium, low
|
|
||||||
; video-memory-usage=high
|
|
||||||
|
|
||||||
; Options: none, high-quality, low-quality
|
|
||||||
; texture-compression-level=high-quality
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; compress-virtual-atlas=true
|
|
||||||
|
|
||||||
; Options: copy, copy-sequential, flip, flip-discard
|
|
||||||
; dxgi-presentation-model=copy
|
|
||||||
|
|
||||||
; Options: none, flush, wait-for-vblank, flush-and-wait-for-vblank
|
|
||||||
; dxgi-action-before-present=none
|
|
||||||
|
|
||||||
; relevant only for flip presentation models
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; dxgi-allow-tearing=false
|
|
||||||
|
|
||||||
; Options: false, true, auto
|
|
||||||
; dxgi-flip-do-not-wait=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; dxgi-present-restart=false
|
|
||||||
|
|
||||||
; dxgi-swap-chain-buffer-count=0
|
|
||||||
|
|
||||||
; dxgi-max-frame-latency=0
|
|
||||||
|
|
||||||
; dxgi-adapter-index=-1
|
|
||||||
|
|
||||||
; max-sprite-loading-threads=32
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; gpu-accelerated-compression=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; gpu-accelerated-mipmap-compression=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; wait-until-mipmap-generation-finished=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; check-for-unused-pixels=false
|
|
||||||
|
|
||||||
; ogl-depth-buffer-bit-depth=0
|
|
||||||
|
|
||||||
; Options: false, true, auto
|
|
||||||
; ogl-accelerated-renderer=auto
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; ogl-double-buffered=true
|
|
||||||
|
|
||||||
; Set to true if mipmapped sprites render very blurry on your GPU. Limited support.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; legacy-gpu-no-mipmaps=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-linear-magnification=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; custom-mipmap-workaround=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; buffer-rename-workaround=false
|
|
||||||
|
|
||||||
; Comma separated list of OpenGL extensions that should not be used (for example: ARB_copy_image,KHR_debug)
|
|
||||||
; disabled-opengl-extensions=
|
|
||||||
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
FACTORIO_VOL=/factorio
|
|
||||||
LOAD_LATEST_SAVE="${LOAD_LATEST_SAVE:-true}"
|
|
||||||
GENERATE_NEW_SAVE="${GENERATE_NEW_SAVE:-false}"
|
|
||||||
SAVE_NAME="${SAVE_NAME:-""}"
|
|
||||||
|
|
||||||
mkdir -p "$FACTORIO_VOL"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
mkdir -p "$SCRIPTOUTPUT"
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
|
||||||
# Generate a new RCON password if none exists
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
# Copy default settings if server-settings.json doesn't exist
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
NRTMPSAVES=$( find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 | wc -l )
|
|
||||||
if [[ $NRTMPSAVES -gt 0 ]]; then
|
|
||||||
# Delete incomplete saves (such as after a forced exit)
|
|
||||||
rm -f "$SAVES"/*.tmp.zip
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${UPDATE_MODS_ON_START:-} == "true" ]]; then
|
|
||||||
./docker-update-mods.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $(id -u) = 0 ]]; then
|
|
||||||
# Update the User and Group ID based on the PUID/PGID variables
|
|
||||||
usermod -o -u "$PUID" factorio
|
|
||||||
groupmod -o -g "$PGID" factorio
|
|
||||||
# Take ownership of factorio data if running as root
|
|
||||||
chown -R factorio:factorio "$FACTORIO_VOL"
|
|
||||||
# Drop to the factorio user
|
|
||||||
SU_EXEC="su-exec factorio"
|
|
||||||
else
|
|
||||||
SU_EXEC=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
|
|
||||||
|
|
||||||
NRSAVES=$(find -L "$SAVES" -iname \*.zip -mindepth 1 | wc -l)
|
|
||||||
if [[ $GENERATE_NEW_SAVE != true && $NRSAVES == 0 ]]; then
|
|
||||||
GENERATE_NEW_SAVE=true
|
|
||||||
SAVE_NAME=_autosave1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $GENERATE_NEW_SAVE == true ]]; then
|
|
||||||
if [[ -z "$SAVE_NAME" ]]; then
|
|
||||||
echo "If \$GENERATE_NEW_SAVE is true, you must specify \$SAVE_NAME"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ -f "$SAVES/$SAVE_NAME.zip" ]]; then
|
|
||||||
echo "Map $SAVES/$SAVE_NAME.zip already exists, skipping map generation"
|
|
||||||
else
|
|
||||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
|
||||||
--create "$SAVES/$SAVE_NAME.zip" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
|
||||||
--map-settings "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
FLAGS=(\
|
|
||||||
--port "$PORT" \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--use-server-whitelist \
|
|
||||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json \
|
|
||||||
)
|
|
||||||
|
|
||||||
if [[ $LOAD_LATEST_SAVE == true ]]; then
|
|
||||||
FLAGS+=( --start-server-load-latest )
|
|
||||||
else
|
|
||||||
FLAGS+=( --start-server "$SAVE_NAME" )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
exec $SU_EXEC /opt/factorio/bin/x64/factorio "${FLAGS[@]}" "$@"
|
|
@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eou pipefail
|
|
||||||
|
|
||||||
if [[ -f /run/secrets/username ]]; then
|
|
||||||
USERNAME=$(cat /run/secrets/username)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f /run/secrets/token ]]; then
|
|
||||||
TOKEN=$(cat /run/secrets/token)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${USERNAME:-} ]]; then
|
|
||||||
USERNAME="$(jq -j ".username" "$CONFIG/server-settings.json")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${TOKEN:-} ]]; then
|
|
||||||
TOKEN="$(jq -j ".token" "$CONFIG/server-settings.json")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${USERNAME:-} ]]; then
|
|
||||||
echo "You need to provide your Factorio username to update mods."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${TOKEN:-} ]]; then
|
|
||||||
echo "You need to provide your Factorio token to update mods."
|
|
||||||
fi
|
|
||||||
|
|
||||||
./update-mods.sh "$VERSION" "$MODS" "$USERNAME" "$TOKEN"
|
|
@ -1,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
if [[ -z ${1:-} ]]; then
|
|
||||||
echo "No argument supplied"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER_SCENARIO="$1"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
|
|
||||||
#chown -R factorio /factorio
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--port "$PORT" \
|
|
||||||
--start-server-load-scenario "$SERVER_SCENARIO" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
|
||||||
--map-settings "$CONFIG/map-settings.json" \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--use-server-whitelist \
|
|
||||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
if [[ -z ${1:-} ]]; then
|
|
||||||
echo "No argument supplied"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER_SCENARIO="$1"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--scenario2map "$SERVER_SCENARIO"
|
|
@ -1,96 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eou pipefail
|
|
||||||
|
|
||||||
FACTORIO_VERSION=$1
|
|
||||||
MOD_DIR=$2
|
|
||||||
USERNAME=$3
|
|
||||||
TOKEN=$4
|
|
||||||
|
|
||||||
MOD_BASE_URL="https://mods.factorio.com"
|
|
||||||
|
|
||||||
print_step()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_success()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_failure()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
update_mod()
|
|
||||||
{
|
|
||||||
MOD_NAME="$1"
|
|
||||||
MOD_NAME_ENCODED="${1// /%20}"
|
|
||||||
|
|
||||||
print_step "Checking for update of mod $MOD_NAME..."
|
|
||||||
|
|
||||||
MOD_INFO_URL="$MOD_BASE_URL/api/mods/$MOD_NAME_ENCODED"
|
|
||||||
MOD_INFO_JSON=$(curl --silent "$MOD_INFO_URL")
|
|
||||||
|
|
||||||
if ! echo "$MOD_INFO_JSON" | jq -e .name >/dev/null; then
|
|
||||||
print_success " Custom mod not on $MOD_BASE_URL, skipped."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
MOD_INFO=$(echo "$MOD_INFO_JSON" | jq -j --arg version "$FACTORIO_VERSION" ".releases|reverse|map(select(.info_json.factorio_version as \$mod_version | \$version | startswith(\$mod_version)))[0]|.file_name, \";\", .download_url, \";\", .sha1")
|
|
||||||
|
|
||||||
MOD_FILENAME=$(echo "$MOD_INFO" | cut -f1 -d";")
|
|
||||||
MOD_URL=$(echo "$MOD_INFO" | cut -f2 -d";")
|
|
||||||
MOD_SHA1=$(echo "$MOD_INFO" | cut -f3 -d";")
|
|
||||||
|
|
||||||
if [[ $MOD_FILENAME == null ]]; then
|
|
||||||
print_failure " Not compatible with version"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_success " Already up-to-date."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
print_step "Downloading..."
|
|
||||||
FULL_URL="$MOD_BASE_URL$MOD_URL?username=$USERNAME&token=$TOKEN"
|
|
||||||
HTTP_STATUS=$(curl --silent -L -w "%{http_code}" -o "$MOD_DIR/$MOD_FILENAME" "$FULL_URL")
|
|
||||||
|
|
||||||
if [[ $HTTP_STATUS != 200 ]]; then
|
|
||||||
print_failure " Download failed: Code $HTTP_STATUS."
|
|
||||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_failure " Downloaded file missing!"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! [[ $(sha1sum "$MOD_DIR/$MOD_FILENAME") =~ $MOD_SHA1 ]]; then
|
|
||||||
print_failure " SHA1 mismatch!"
|
|
||||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
print_success " Download complete."
|
|
||||||
|
|
||||||
for file in "$MOD_DIR/${MOD_NAME}_"*".zip"; do # wildcard does usually not work in quotes: https://unix.stackexchange.com/a/67761
|
|
||||||
if [[ $file != $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_success " Deleting old version: $file"
|
|
||||||
rm -f "$file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -f $MOD_DIR/mod-list.json ]]; then
|
|
||||||
jq -r ".mods|map(select(.enabled))|.[].name" "$MOD_DIR/mod-list.json" | while read -r mod; do
|
|
||||||
if [[ $mod != base ]]; then
|
|
||||||
update_mod "$mod"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
@ -1,45 +0,0 @@
|
|||||||
FROM frolvlad/alpine-glibc:alpine-3.12
|
|
||||||
|
|
||||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
|
||||||
|
|
||||||
ARG USER=factorio
|
|
||||||
ARG GROUP=factorio
|
|
||||||
ARG PUID=845
|
|
||||||
ARG PGID=845
|
|
||||||
|
|
||||||
ENV PORT=34197 \
|
|
||||||
RCON_PORT=27015 \
|
|
||||||
VERSION=1.1.1 \
|
|
||||||
SHA1=f3577e7d48615461d37c88721f7d3134ff128c5a \
|
|
||||||
SAVES=/factorio/saves \
|
|
||||||
CONFIG=/factorio/config \
|
|
||||||
MODS=/factorio/mods \
|
|
||||||
SCENARIOS=/factorio/scenarios \
|
|
||||||
SCRIPTOUTPUT=/factorio/script-output \
|
|
||||||
PUID="$PUID" \
|
|
||||||
PGID="$PGID"
|
|
||||||
|
|
||||||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
|
||||||
RUN set -ox pipefail \
|
|
||||||
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
|
|
||||||
&& mkdir -p /opt /factorio \
|
|
||||||
&& apk add --update --no-cache --no-progress bash binutils curl file gettext jq libintl pwgen shadow su-exec \
|
|
||||||
&& curl -sSL "https://www.factorio.com/get-download/$VERSION/headless/linux64" -o "$archive" \
|
|
||||||
&& echo "$SHA1 $archive" | sha1sum -c \
|
|
||||||
|| (sha1sum "$archive" && file "$archive" && exit 1) \
|
|
||||||
&& tar xf "$archive" --directory /opt \
|
|
||||||
&& chmod ugo=rwx /opt/factorio \
|
|
||||||
&& rm "$archive" \
|
|
||||||
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
|
|
||||||
&& ln -s "$SAVES" /opt/factorio/saves \
|
|
||||||
&& mkdir -p /opt/factorio/config/ \
|
|
||||||
&& addgroup -g "$PGID" -S "$GROUP" \
|
|
||||||
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
|
|
||||||
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
|
|
||||||
|
|
||||||
COPY files/*.sh /
|
|
||||||
COPY files/config.ini /opt/factorio/config/config.ini
|
|
||||||
|
|
||||||
VOLUME /factorio
|
|
||||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
@ -1,16 +0,0 @@
|
|||||||
version: '2'
|
|
||||||
services:
|
|
||||||
factorio:
|
|
||||||
build: .
|
|
||||||
ports:
|
|
||||||
- "34197:34197/udp"
|
|
||||||
- "27015:27015/tcp"
|
|
||||||
volumes:
|
|
||||||
- /opt/factorio:/factorio
|
|
||||||
# environment:
|
|
||||||
# - PUID=1000
|
|
||||||
# - PGID=1000
|
|
||||||
# - UPDATE_MODS_ON_START=true
|
|
||||||
# - USERNAME=FactorioUsername
|
|
||||||
# - TOKEN=FactorioToken
|
|
||||||
# - PORT=34198
|
|
@ -1,755 +0,0 @@
|
|||||||
; version=8
|
|
||||||
; This is INI file : https://en.wikipedia.org/wiki/INI_file#Format
|
|
||||||
; Semicolons (;) at the beginning of the line indicate a comment. Comment lines are ignored.
|
|
||||||
[path]
|
|
||||||
read-data=__PATH__executable__/../../data
|
|
||||||
write-data=__PATH__executable__/../..
|
|
||||||
|
|
||||||
[general]
|
|
||||||
locale=
|
|
||||||
|
|
||||||
[other]
|
|
||||||
; Options: true, false
|
|
||||||
; verbose-logging=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; log-saving-statistics=false
|
|
||||||
|
|
||||||
; autosave-interval=5
|
|
||||||
|
|
||||||
; autosave-slots=3
|
|
||||||
|
|
||||||
; In ticks
|
|
||||||
; minimum-latency-in-multiplayer=0
|
|
||||||
|
|
||||||
; In seconds
|
|
||||||
; multiplayer-initial-connection-timeout=10
|
|
||||||
|
|
||||||
; port=34197
|
|
||||||
|
|
||||||
; max-map-preview-chunk-side=64
|
|
||||||
|
|
||||||
; max-map-preview-threads=7
|
|
||||||
|
|
||||||
; In bytes
|
|
||||||
; max-multiplayer-script-reload-size=1048576
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-steam-networking=true
|
|
||||||
|
|
||||||
; proxy=
|
|
||||||
|
|
||||||
; proxy-username=
|
|
||||||
|
|
||||||
; proxy-password=
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; check-updates=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-experimental-updates=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-new-mods=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-mod-settings-per-save=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; disable-minimal-mode=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; disable-blueprint-storage=false
|
|
||||||
|
|
||||||
; Disables tracking which mod created/changed what prototype. Mainly for faster startup during development.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; disable-prototype-history=false
|
|
||||||
|
|
||||||
; Print a warning for all prototype values that were not accessed.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; check-unused-prototype-data=false
|
|
||||||
|
|
||||||
; Cache data stage prototype data for faster startup. Experimental.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; cache-prototype-data=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-razer-chroma-support=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-logitech-led-support=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-crash-log-uploading=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-heap-validation=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-threaded-message-pump=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-taskbar-animation=true
|
|
||||||
|
|
||||||
; Does nothing on Windows
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; non-blocking-saving=false
|
|
||||||
|
|
||||||
; Related to MacOS
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; discard-mouse-events-when-accessibility-zoomed=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-blueprint-storage-cloud-sync=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-enable-factorio-version-check=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; bring-window-to-top-on-click=true
|
|
||||||
|
|
||||||
; Options: fast, maximum
|
|
||||||
; multiplayer-compression-level=fast
|
|
||||||
|
|
||||||
; Options: none, fast, maximum
|
|
||||||
; autosave-compression-level=fast
|
|
||||||
|
|
||||||
; Socket to host RCON on when lauching MP server from the menu.
|
|
||||||
; local-rcon-socket=0.0.0.0:0
|
|
||||||
|
|
||||||
; Password for RCON when launching MP server from the menu.
|
|
||||||
; local-rcon-password=
|
|
||||||
|
|
||||||
|
|
||||||
[interface]
|
|
||||||
; Options: true, false
|
|
||||||
; automatic-ui-scale=true
|
|
||||||
|
|
||||||
; custom-ui-scale=1.000000
|
|
||||||
|
|
||||||
; tooltip-delay=0.040000
|
|
||||||
|
|
||||||
; entity-tooltip-delay=0.000000
|
|
||||||
|
|
||||||
; tooltip-offset=20
|
|
||||||
|
|
||||||
; output-console-delay=1200
|
|
||||||
|
|
||||||
; train-stop-label-angle=0.085526
|
|
||||||
|
|
||||||
; active-quick-bars=2
|
|
||||||
|
|
||||||
; shortcut-bar-rows=2
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; autosort-inventory=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; research-finished-stops-game=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-item-groups=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-item-subgroups=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-version-filter-in-browse-games-gui=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-version-filter-in-install-mods-gui=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; play-sound-for-chat-messages=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; fuzzy-search-enabled=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; pick-ghost-cursor=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-minimap=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tips-and-tricks=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tutorial-notifications=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-turret-radius-when-blueprinting=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-item-labels-in-cursor=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-rail-block-visualization=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-missing-logistic-network-icon=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-interaction-indications=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-grid-when-paused=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-arrows-when-selected=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-arrows-when-detailed-info-is-on=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-pump-arrows-when-detailed-info-is-on=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-mining-drill-arrows-when-detailed-info-is-on=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-combinator-settings-when-detailed-info-is-on=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; entity-tooltip-on-the-side=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-mod-owners-in-tooltips=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-descriptions-in-tooltips=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-total-raw-in-recipe-tooltips=true
|
|
||||||
|
|
||||||
; debug-font-size=18
|
|
||||||
|
|
||||||
; train-visualization-length=5
|
|
||||||
|
|
||||||
|
|
||||||
[sound]
|
|
||||||
; master-volume=0.800000
|
|
||||||
|
|
||||||
; music-volume=0.500000
|
|
||||||
|
|
||||||
; game-effects-volume=0.700000
|
|
||||||
|
|
||||||
; gui-effects-volume=0.600000
|
|
||||||
|
|
||||||
; walking-sound-volume=0.250000
|
|
||||||
|
|
||||||
; environment-sounds-volume=0.550000
|
|
||||||
|
|
||||||
; alerts-volume=0.500000
|
|
||||||
|
|
||||||
; wind-volume=0.350000
|
|
||||||
|
|
||||||
; audible-distance=40.000000
|
|
||||||
|
|
||||||
; environment-audible-distance=30.000000
|
|
||||||
|
|
||||||
; maximum-environment-sounds=50
|
|
||||||
|
|
||||||
; active-gui-volume-modifier=0.800000
|
|
||||||
|
|
||||||
; active-gui-environment-volume-modifier=0.400000
|
|
||||||
|
|
||||||
; The maximum volume allowed for any sound.
|
|
||||||
; maximum-volume=2.000000
|
|
||||||
|
|
||||||
; ambient-music-pause-mean-seconds=45.000000
|
|
||||||
|
|
||||||
; ambient-music-pause-variance-seconds=30.000000
|
|
||||||
|
|
||||||
; Options: main-tracks-only, interleave-main-tracks-with-interludes, randomize-all
|
|
||||||
; ambient-music-mode=interleave-main-tracks-with-interludes
|
|
||||||
|
|
||||||
; zoom-audible-distance-coefficient=0.500000
|
|
||||||
|
|
||||||
; zoom-volume-coefficient=0.750000
|
|
||||||
|
|
||||||
|
|
||||||
[map-view]
|
|
||||||
; Options: true, false
|
|
||||||
; show-logistic-network=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-electric-network=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-turret-range=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-pollution=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-networkless-logistic-members=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-train-station-names=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-player-names=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-non-standard-map-info=false
|
|
||||||
|
|
||||||
|
|
||||||
[debug]
|
|
||||||
; force=enemy
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; capture-perf-statistics=false
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fps=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-detailed-info=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-time-usage=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-gpu-time-usage=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-sprite-counts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-lua-object-statistics=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-heat-buffer-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-waiting-icon=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-statistics=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-multiplayer-selection-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-debug-info-in-tooltips=debug
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; hide-mod-guis=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-tile-grid=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-collision-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selection-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-render-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-entity-positions=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-entity-velocities=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-entity-advanced-tiles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-input-transport-belts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-requests=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-next-waypoint-bb=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-target=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-unit-group-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-unit-behavior-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-pathfinder-fringe=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-cache=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-path-cache-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-paths=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rolling-stock-count=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-connections=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-joints=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-signal-states=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-rail-segment-collision-boxes=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-stop-point=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-braking-distance=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-signals=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-train-repathing=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-network-connected-entities=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-circuit-network-numbers=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-energy-sources-networks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-state=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-wakeup-lists=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-transport-lines=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-transport-line-gaps=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-pollution-values=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-entities-on-chunk-counts=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-active-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-polluted-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; hide-chart-tags=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-enemy-expansion-candidate-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-enemy-expansion-candidate-chunk-values=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-bad-attack-chunks=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-tile-variations=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-raw-tile-transitions=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fluid-box-fluid-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-environment-sound-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-environment-sound-area=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-selected-entity-audible-range=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-recently-played-sound-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-logistic-robot-targets=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-logistic-robots-on-map=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-recipe-icons-on-map=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-player-robots=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-fire-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-sticker-info=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-decorative-names=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-decorative-collision-rectangles=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; allow-increased-zoom=never
|
|
||||||
|
|
||||||
; Options: always, debug, never
|
|
||||||
; show-chunk-components=never
|
|
||||||
|
|
||||||
|
|
||||||
[multiplayer-lobby]
|
|
||||||
; name=
|
|
||||||
|
|
||||||
; description=
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-public=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-steam=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; visibility-lan=true
|
|
||||||
|
|
||||||
; max-players=0
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; ignore-player-limit-when-returning=false
|
|
||||||
|
|
||||||
; max-upload-in-kilobytes-per-second=0
|
|
||||||
|
|
||||||
; max-upload-slots=5
|
|
||||||
|
|
||||||
; password=
|
|
||||||
|
|
||||||
; tag-list=
|
|
||||||
|
|
||||||
; afk-auto-kick=0
|
|
||||||
|
|
||||||
; Options: true, false, admins-only
|
|
||||||
; allowed-commands=admins-only
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; only-admins-can-pause=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; autosave-only-on-server=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; non-blocking-saving=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; verify-user-identity=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; enable-whitelist=false
|
|
||||||
|
|
||||||
|
|
||||||
[graphics]
|
|
||||||
; lights-render-quality=0.250000
|
|
||||||
|
|
||||||
; Default preferred display index should force finding primary monitor
|
|
||||||
; preferred-display-index=255
|
|
||||||
|
|
||||||
; screenshots-threads-count=8
|
|
||||||
|
|
||||||
; cache-sprite-atlas-count=1
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; cache-sprite-atlas=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; compress-sprite-atlas-cache=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; texture-streaming=true
|
|
||||||
|
|
||||||
; streamed-atlas-physical-vram-size=0
|
|
||||||
|
|
||||||
; sprite-vertex-buffer-size=1048576
|
|
||||||
|
|
||||||
; max-texture-size=0
|
|
||||||
|
|
||||||
; max-threads=8
|
|
||||||
|
|
||||||
; 'low' and 'very-low' options are deprecated and will be migrated to 'normal'
|
|
||||||
;
|
|
||||||
; Options: high, normal, low, very-low
|
|
||||||
; graphics-quality=normal
|
|
||||||
|
|
||||||
; brightness=0
|
|
||||||
|
|
||||||
; contrast=0
|
|
||||||
|
|
||||||
; saturation=100
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; full-screen=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; minimize-on-focus-loss=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-smoke=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-clouds=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-decoratives=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-particles=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-item-shadows=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-inserter-shadows=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-animated-water=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; show-tree-distortion=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-opengl=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; v-sync=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-animations=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-shadows=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; high-quality-terrain=true
|
|
||||||
|
|
||||||
; Minimum number of turrets required to turn on the turret range overdraw optimization
|
|
||||||
; turret-overdraw-minimum-count=4
|
|
||||||
|
|
||||||
; Scale at which the turret range overdraw optimization will start being applied
|
|
||||||
; turret-overdraw-scale-threshold=0.200000
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; skip-vram-detection=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; halt-rendering-when-minimized=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; runtime-sprite-reload=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; full-color-depth=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; render-in-native-resolution=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; use-flip-presentation-model=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; debug-api=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; discard-buffers-on-begin-frame=true
|
|
||||||
|
|
||||||
; Options: all, high, medium, low
|
|
||||||
; video-memory-usage=high
|
|
||||||
|
|
||||||
; Options: none, high-quality, low-quality
|
|
||||||
; texture-compression-level=high-quality
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; compress-virtual-atlas=true
|
|
||||||
|
|
||||||
; Options: copy, copy-sequential, flip, flip-discard
|
|
||||||
; dxgi-presentation-model=copy
|
|
||||||
|
|
||||||
; Options: none, flush, wait-for-vblank, flush-and-wait-for-vblank
|
|
||||||
; dxgi-action-before-present=none
|
|
||||||
|
|
||||||
; relevant only for flip presentation models
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; dxgi-allow-tearing=false
|
|
||||||
|
|
||||||
; Options: false, true, auto
|
|
||||||
; dxgi-flip-do-not-wait=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; dxgi-present-restart=false
|
|
||||||
|
|
||||||
; dxgi-swap-chain-buffer-count=0
|
|
||||||
|
|
||||||
; dxgi-max-frame-latency=0
|
|
||||||
|
|
||||||
; dxgi-adapter-index=-1
|
|
||||||
|
|
||||||
; max-sprite-loading-threads=32
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; gpu-accelerated-compression=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; gpu-accelerated-mipmap-compression=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; wait-until-mipmap-generation-finished=true
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; check-for-unused-pixels=false
|
|
||||||
|
|
||||||
; ogl-depth-buffer-bit-depth=0
|
|
||||||
|
|
||||||
; Options: false, true, auto
|
|
||||||
; ogl-accelerated-renderer=auto
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; ogl-double-buffered=true
|
|
||||||
|
|
||||||
; Set to true if mipmapped sprites render very blurry on your GPU. Limited support.
|
|
||||||
;
|
|
||||||
; Options: true, false
|
|
||||||
; legacy-gpu-no-mipmaps=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; force-linear-magnification=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; custom-mipmap-workaround=false
|
|
||||||
|
|
||||||
; Options: true, false
|
|
||||||
; buffer-rename-workaround=false
|
|
||||||
|
|
||||||
; Comma separated list of OpenGL extensions that should not be used (for example: ARB_copy_image,KHR_debug)
|
|
||||||
; disabled-opengl-extensions=
|
|
||||||
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
FACTORIO_VOL=/factorio
|
|
||||||
LOAD_LATEST_SAVE="${LOAD_LATEST_SAVE:-true}"
|
|
||||||
GENERATE_NEW_SAVE="${GENERATE_NEW_SAVE:-false}"
|
|
||||||
SAVE_NAME="${SAVE_NAME:-""}"
|
|
||||||
|
|
||||||
mkdir -p "$FACTORIO_VOL"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
mkdir -p "$SCRIPTOUTPUT"
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
|
||||||
# Generate a new RCON password if none exists
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
# Copy default settings if server-settings.json doesn't exist
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
NRTMPSAVES=$( find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 | wc -l )
|
|
||||||
if [[ $NRTMPSAVES -gt 0 ]]; then
|
|
||||||
# Delete incomplete saves (such as after a forced exit)
|
|
||||||
rm -f "$SAVES"/*.tmp.zip
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${UPDATE_MODS_ON_START:-} == "true" ]]; then
|
|
||||||
./docker-update-mods.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $(id -u) = 0 ]]; then
|
|
||||||
# Update the User and Group ID based on the PUID/PGID variables
|
|
||||||
usermod -o -u "$PUID" factorio
|
|
||||||
groupmod -o -g "$PGID" factorio
|
|
||||||
# Take ownership of factorio data if running as root
|
|
||||||
chown -R factorio:factorio "$FACTORIO_VOL"
|
|
||||||
# Drop to the factorio user
|
|
||||||
SU_EXEC="su-exec factorio"
|
|
||||||
else
|
|
||||||
SU_EXEC=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
|
|
||||||
|
|
||||||
NRSAVES=$(find -L "$SAVES" -iname \*.zip -mindepth 1 | wc -l)
|
|
||||||
if [[ $GENERATE_NEW_SAVE != true && $NRSAVES == 0 ]]; then
|
|
||||||
GENERATE_NEW_SAVE=true
|
|
||||||
SAVE_NAME=_autosave1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $GENERATE_NEW_SAVE == true ]]; then
|
|
||||||
if [[ -z "$SAVE_NAME" ]]; then
|
|
||||||
echo "If \$GENERATE_NEW_SAVE is true, you must specify \$SAVE_NAME"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ -f "$SAVES/$SAVE_NAME.zip" ]]; then
|
|
||||||
echo "Map $SAVES/$SAVE_NAME.zip already exists, skipping map generation"
|
|
||||||
else
|
|
||||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
|
||||||
--create "$SAVES/$SAVE_NAME.zip" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
|
||||||
--map-settings "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
FLAGS=(\
|
|
||||||
--port "$PORT" \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--use-server-whitelist \
|
|
||||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json \
|
|
||||||
)
|
|
||||||
|
|
||||||
if [[ $LOAD_LATEST_SAVE == true ]]; then
|
|
||||||
FLAGS+=( --start-server-load-latest )
|
|
||||||
else
|
|
||||||
FLAGS+=( --start-server "$SAVE_NAME" )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
exec $SU_EXEC /opt/factorio/bin/x64/factorio "${FLAGS[@]}" "$@"
|
|
@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eou pipefail
|
|
||||||
|
|
||||||
if [[ -f /run/secrets/username ]]; then
|
|
||||||
USERNAME=$(cat /run/secrets/username)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f /run/secrets/token ]]; then
|
|
||||||
TOKEN=$(cat /run/secrets/token)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${USERNAME:-} ]]; then
|
|
||||||
USERNAME="$(jq -j ".username" "$CONFIG/server-settings.json")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${TOKEN:-} ]]; then
|
|
||||||
TOKEN="$(jq -j ".token" "$CONFIG/server-settings.json")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${USERNAME:-} ]]; then
|
|
||||||
echo "You need to provide your Factorio username to update mods."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z ${TOKEN:-} ]]; then
|
|
||||||
echo "You need to provide your Factorio token to update mods."
|
|
||||||
fi
|
|
||||||
|
|
||||||
./update-mods.sh "$VERSION" "$MODS" "$USERNAME" "$TOKEN"
|
|
@ -1,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
if [[ -z ${1:-} ]]; then
|
|
||||||
echo "No argument supplied"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER_SCENARIO="$1"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
|
|
||||||
#chown -R factorio /factorio
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
|
||||||
pwgen 15 1 >"$CONFIG/rconpw"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--port "$PORT" \
|
|
||||||
--start-server-load-scenario "$SERVER_SCENARIO" \
|
|
||||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
|
||||||
--map-settings "$CONFIG/map-settings.json" \
|
|
||||||
--server-settings "$CONFIG/server-settings.json" \
|
|
||||||
--server-banlist "$CONFIG/server-banlist.json" \
|
|
||||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
|
||||||
--use-server-whitelist \
|
|
||||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
|
||||||
--rcon-port "$RCON_PORT" \
|
|
||||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
|
||||||
--server-id /factorio/config/server-id.json
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
if [[ -z ${1:-} ]]; then
|
|
||||||
echo "No argument supplied"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER_SCENARIO="$1"
|
|
||||||
mkdir -p "$SAVES"
|
|
||||||
mkdir -p "$CONFIG"
|
|
||||||
mkdir -p "$MODS"
|
|
||||||
mkdir -p "$SCENARIOS"
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|
||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
|
||||||
--scenario2map "$SERVER_SCENARIO"
|
|
@ -1,96 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eou pipefail
|
|
||||||
|
|
||||||
FACTORIO_VERSION=$1
|
|
||||||
MOD_DIR=$2
|
|
||||||
USERNAME=$3
|
|
||||||
TOKEN=$4
|
|
||||||
|
|
||||||
MOD_BASE_URL="https://mods.factorio.com"
|
|
||||||
|
|
||||||
print_step()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_success()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_failure()
|
|
||||||
{
|
|
||||||
echo "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
update_mod()
|
|
||||||
{
|
|
||||||
MOD_NAME="$1"
|
|
||||||
MOD_NAME_ENCODED="${1// /%20}"
|
|
||||||
|
|
||||||
print_step "Checking for update of mod $MOD_NAME..."
|
|
||||||
|
|
||||||
MOD_INFO_URL="$MOD_BASE_URL/api/mods/$MOD_NAME_ENCODED"
|
|
||||||
MOD_INFO_JSON=$(curl --silent "$MOD_INFO_URL")
|
|
||||||
|
|
||||||
if ! echo "$MOD_INFO_JSON" | jq -e .name >/dev/null; then
|
|
||||||
print_success " Custom mod not on $MOD_BASE_URL, skipped."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
MOD_INFO=$(echo "$MOD_INFO_JSON" | jq -j --arg version "$FACTORIO_VERSION" ".releases|reverse|map(select(.info_json.factorio_version as \$mod_version | \$version | startswith(\$mod_version)))[0]|.file_name, \";\", .download_url, \";\", .sha1")
|
|
||||||
|
|
||||||
MOD_FILENAME=$(echo "$MOD_INFO" | cut -f1 -d";")
|
|
||||||
MOD_URL=$(echo "$MOD_INFO" | cut -f2 -d";")
|
|
||||||
MOD_SHA1=$(echo "$MOD_INFO" | cut -f3 -d";")
|
|
||||||
|
|
||||||
if [[ $MOD_FILENAME == null ]]; then
|
|
||||||
print_failure " Not compatible with version"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_success " Already up-to-date."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
print_step "Downloading..."
|
|
||||||
FULL_URL="$MOD_BASE_URL$MOD_URL?username=$USERNAME&token=$TOKEN"
|
|
||||||
HTTP_STATUS=$(curl --silent -L -w "%{http_code}" -o "$MOD_DIR/$MOD_FILENAME" "$FULL_URL")
|
|
||||||
|
|
||||||
if [[ $HTTP_STATUS != 200 ]]; then
|
|
||||||
print_failure " Download failed: Code $HTTP_STATUS."
|
|
||||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_failure " Downloaded file missing!"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! [[ $(sha1sum "$MOD_DIR/$MOD_FILENAME") =~ $MOD_SHA1 ]]; then
|
|
||||||
print_failure " SHA1 mismatch!"
|
|
||||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
print_success " Download complete."
|
|
||||||
|
|
||||||
for file in "$MOD_DIR/${MOD_NAME}_"*".zip"; do # wildcard does usually not work in quotes: https://unix.stackexchange.com/a/67761
|
|
||||||
if [[ $file != $MOD_DIR/$MOD_FILENAME ]]; then
|
|
||||||
print_success " Deleting old version: $file"
|
|
||||||
rm -f "$file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -f $MOD_DIR/mod-list.json ]]; then
|
|
||||||
jq -r ".mods|map(select(.enabled))|.[].name" "$MOD_DIR/mod-list.json" | while read -r mod; do
|
|
||||||
if [[ $mod != base ]]; then
|
|
||||||
update_mod "$mod"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
FROM frolvlad/alpine-glibc:alpine-3.3_glibc-2.23
|
||||||
|
|
||||||
|
MAINTAINER zopanix <zopanix@gmail.com>
|
||||||
|
|
||||||
|
WORKDIR /opt
|
||||||
|
|
||||||
|
COPY ./smart_launch.sh /opt
|
||||||
|
COPY ./factorio.crt /opt
|
||||||
|
|
||||||
|
VOLUME /opt/factorio/saves /opt/factorio/mods
|
||||||
|
|
||||||
|
ENV FACTORIO_AUTOSAVE_INTERVAL=2 \
|
||||||
|
FACTORIO_AUTOSAVE_SLOTS=3 \
|
||||||
|
FACTORIO_DISSALOW_COMMANDS=true \
|
||||||
|
FACTORIO_NO_AUTO_PAUSE=false \
|
||||||
|
VERSION=0.12.33 \
|
||||||
|
FACTORIO_SHA1=9802b22f428eb404369d496f6d40633a64984406
|
||||||
|
|
||||||
|
RUN apk --update add bash curl && \
|
||||||
|
curl -sSL --cacert /opt/factorio.crt https://www.factorio.com/get-download/$VERSION/headless/linux64 -o /tmp/factorio_headless_x64_$VERSION.tar.gz && \
|
||||||
|
echo "$FACTORIO_SHA1 /tmp/factorio_headless_x64_$VERSION.tar.gz" | sha1sum -c && \
|
||||||
|
tar xzf /tmp/factorio_headless_x64_$VERSION.tar.gz && \
|
||||||
|
rm /tmp/factorio_headless_x64_$VERSION.tar.gz
|
||||||
|
|
||||||
|
EXPOSE 34197/udp
|
||||||
|
|
||||||
|
CMD ["./smart_launch.sh"]
|
||||||
|
|
425
README.md
425
README.md
@ -1,22 +1,13 @@
|
|||||||
# Factorio [](https://travis-ci.org/factoriotools/factorio-docker)  [](https://hub.docker.com/r/factoriotools/factorio/) [](https://hub.docker.com/r/factoriotools/factorio/) [](https://hub.docker.com/r/factoriotools/factorio/) [](https://microbadger.com/images/factoriotools/factorio "Get your own image badge on microbadger.com")
|
# Supported tags and respective `Dockerfile` links
|
||||||
|
|
||||||
* `1.1.1`, `1.1`, `latest` [(1.1/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/1.1/Dockerfile)
|
* `0.12.33`, `latest` [(0.12.33/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/dt_0.12.33/Dockerfile)
|
||||||
* `1.0.0`, `1.0`, `stable` [(1.0/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/1.0/Dockerfile)
|
* `0.12.32` [(0.12.32/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/dt_0.12.32/Dockerfile)
|
||||||
* `0.18.47`, `0.18` [(0.18/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.18/Dockerfile)
|
* `0.12.31` [(0.12.31/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/dt_0.12.31/Dockerfile)
|
||||||
* `0.17.79`, `0.17` [(0.17/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.17/Dockerfile)
|
* `0.12.30` [(0.12.30/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/dt_0.12.30/Dockerfile)
|
||||||
* `0.16.51`, `0.16` [(0.16/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.16/Dockerfile)
|
|
||||||
* `0.15.40`, `0.15` [(0.15/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.15/Dockerfile)
|
|
||||||
* `0.14.23`, `0.14` [(0.14/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.14/Dockerfile)
|
|
||||||
|
|
||||||
## Tag descriptions
|
[](https://imagelayers.io/?images=dtandersen/factorio:latest 'Get your own badge on imagelayers.io')
|
||||||
|
|
||||||
* `latest` - most up-to-date version (may be experimental).
|
# What is Factorio?
|
||||||
* `stable` - version declared stable on [factorio.com](https://www.factorio.com).
|
|
||||||
* `0.x` - latest version in a branch.
|
|
||||||
* `0.x.y` - a specific version.
|
|
||||||
* `0.x-z` - incremental fix for that version.
|
|
||||||
|
|
||||||
## What is Factorio?
|
|
||||||
|
|
||||||
[Factorio](https://www.factorio.com) is a game in which you build and maintain factories.
|
[Factorio](https://www.factorio.com) is a game in which you build and maintain factories.
|
||||||
|
|
||||||
@ -24,363 +15,137 @@ You will be mining resources, researching technologies, building infrastructure,
|
|||||||
|
|
||||||
The game is very stable and optimized for building massive factories. You can create your own maps, write mods in Lua or play with friends via Multiplayer.
|
The game is very stable and optimized for building massive factories. You can create your own maps, write mods in Lua or play with friends via Multiplayer.
|
||||||
|
|
||||||
NOTE: This is only the server. The full game is available at [Factorio.com](https://www.factorio.com), [Steam](https://store.steampowered.com/app/427520/), [GOG.com](https://www.gog.com/game/factorio) and [Humble Bundle](https://www.humblebundle.com/store/factorio).
|
NOTE: This is only the server. The game is available on [Steam](http://store.steampowered.com/app/427520/).
|
||||||
|
|
||||||
## Usage
|
# Features
|
||||||
|
|
||||||
### Quick Start
|
* Automatically takes latest save or autosave when restarting the container.
|
||||||
|
* Volumes for saves and mods
|
||||||
|
* Set autosave interval and number of saves.
|
||||||
|
* Enable/disable the no-auto-pause option.
|
||||||
|
* Enable/disable console commands in game.
|
||||||
|
* Based on Alpine Linux.
|
||||||
|
|
||||||
Run the server to create the necessary folder structure and configuration files. For this example data is stored in `/opt/factorio`.
|
# How to use this image?
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
This runs factorio with default settings, and your save will be kept:
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo mkdir -p /opt/factorio
|
|
||||||
sudo chown 845:845 /opt/factorio
|
|
||||||
sudo docker run -d \
|
|
||||||
-p 34197:34197/udp \
|
|
||||||
-p 27015:27015/tcp \
|
|
||||||
-v /opt/factorio:/factorio \
|
|
||||||
--name factorio \
|
|
||||||
--restart=always \
|
|
||||||
factoriotools/factorio
|
|
||||||
```
|
```
|
||||||
|
|
||||||
For those new to Docker, here is an explanation of the options:
|
|
||||||
|
|
||||||
* `-d` - Run as a daemon ("detached").
|
|
||||||
* `-p` - Expose ports.
|
|
||||||
* `-v` - Mount `/opt/factorio` on the local file system to `/factorio` in the container.
|
|
||||||
* `--restart` - Restart the server if it crashes and at system start
|
|
||||||
* `--name` - Name the container "factorio" (otherwise it has a funny random name).
|
|
||||||
|
|
||||||
The `chown` command is needed because in 0.16+, we no longer run the game server as root for security reasons, but rather as a 'factorio' user with user id 845. The host must therefore allow these files to be written by that user.
|
|
||||||
|
|
||||||
Check the logs to see what happened:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker logs factorio
|
|
||||||
```
|
|
||||||
|
|
||||||
Stop the server:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker stop factorio
|
|
||||||
```
|
|
||||||
|
|
||||||
Now there's a `server-settings.json` file in the folder `/opt/factorio/config`. Modify this to your liking and restart the server:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker start factorio
|
|
||||||
```
|
|
||||||
|
|
||||||
Try to connect to the server. Check the logs if it isn't working.
|
|
||||||
|
|
||||||
### Console
|
|
||||||
|
|
||||||
To issue console commands to the server, start the server in interactive mode with `-it`. Open the console with `docker attach` and then type commands.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker run -d -it \
|
|
||||||
--name factorio \
|
|
||||||
factoriotools/factorio
|
|
||||||
docker attach factorio
|
|
||||||
```
|
|
||||||
|
|
||||||
### Upgrading
|
|
||||||
|
|
||||||
Before upgrading backup the save. It's easy to make a save in the client.
|
|
||||||
|
|
||||||
Ensure `-v` was used to run the server so the save is outside of the Docker container. The `docker rm` command completely destroys the container, which includes the save if it isn't stored in an data volume.
|
|
||||||
|
|
||||||
Delete the container and refresh the image:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker stop factorio
|
|
||||||
docker rm factorio
|
|
||||||
docker pull factoriotools/factorio
|
|
||||||
```
|
|
||||||
|
|
||||||
Now run the server as before. In about a minute the new version of Factorio should be up and running, complete with saves and config!
|
|
||||||
|
|
||||||
### Saves
|
|
||||||
|
|
||||||
A new map named `_autosave1.zip` is generated the first time the server is started. The `map-gen-settings.json` and `map-settings.json` files in `/opt/factorio/config` are used for the map settings. On subsequent runs the newest save is used.
|
|
||||||
|
|
||||||
To load an old save stop the server and run the command `touch oldsave.zip`. This resets the date. Then restart the server. Another option is to delete all saves except one.
|
|
||||||
|
|
||||||
To generate a new map stop the server, delete all of the saves and restart the server.
|
|
||||||
|
|
||||||
#### Specify a save directly (0.17.79-2+)
|
|
||||||
|
|
||||||
You can specify a specific save to load by configuring the server through a set of environment variables:
|
|
||||||
|
|
||||||
To load an existing save set `SAVE_NAME` to the name of your existing save file located within the `saves` directory, without the `.zip` extension:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo docker run -d \
|
|
||||||
-p 34197:34197/udp \
|
|
||||||
-p 27015:27015/tcp \
|
|
||||||
-v /opt/factorio:/factorio \
|
|
||||||
-e LOAD_LATEST_SAVE=false \
|
|
||||||
-e SAVE_NAME=replaceme \
|
|
||||||
--name factorio \
|
|
||||||
--restart=always \
|
|
||||||
factoriotools/factorio
|
|
||||||
```
|
|
||||||
|
|
||||||
To generate a new map set `GENERATE_NEW_SAVE=true` and specify `SAVE_NAME`:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo docker run -d \
|
|
||||||
-p 34197:34197/udp \
|
|
||||||
-p 27015:27015/tcp \
|
|
||||||
-v /opt/factorio:/factorio \
|
|
||||||
-e LOAD_LATEST_SAVE=false \
|
|
||||||
-e GENERATE_NEW_SAVE=true \
|
|
||||||
-e SAVE_NAME=replaceme \
|
|
||||||
--name factorio \
|
|
||||||
--restart=always \
|
|
||||||
factoriotools/factorio
|
|
||||||
```
|
|
||||||
|
|
||||||
### Mods
|
|
||||||
|
|
||||||
Copy mods into the mods folder and restart the server.
|
|
||||||
|
|
||||||
As of 0.17 a new environment variable was added ``UPDATE_MODS_ON_START`` which if set to ``true`` will cause the mods get to updated on server start. If set a valid [Factorio Username and Token](https://www.factorio.com/profile) must be supplied or else the server will not start. They can either be set as docker secrets, environment variables, or pulled from the server-settings.json file.
|
|
||||||
|
|
||||||
### Scenarios
|
|
||||||
|
|
||||||
If you want to launch a scenario from a clean start (not from a saved map) you'll need to start the docker image from an alternate entrypoint. To do this, use the example entrypoint file stored in the /factorio/entrypoints directory in the volume, and launch the image with the following syntax. Note that this is the normal syntax with the addition of the --entrypoint setting AND the additional argument at the end, which is the name of the Scenario in the Scenarios folder.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker run -d \
|
docker run -d \
|
||||||
-p 34197:34197/udp \
|
-v [PATH]:/opt/factorio/saves \
|
||||||
-p 27015:27015/tcp \
|
-p [PORT]:34197/udp \
|
||||||
-v /opt/factorio:/factorio \
|
dtandersen/factorio
|
||||||
--name factorio \
|
|
||||||
--restart=always \
|
|
||||||
--entrypoint "/scenario.sh" \
|
|
||||||
factoriotools/factorio \
|
|
||||||
MyScenarioName
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Converting Scenarios to Regular Maps
|
* Where [PATH] is a folder where you'll put your saves, if there already is a save in it with the string "save", that one will be taken by default, otherwize, a new one will be made.
|
||||||
|
* Where [PORT] is the port number you choose, if you're going to launch it on your local machine, don't use the port 34197, take another one at random.
|
||||||
|
|
||||||
If you would like to export your scenario to a saved map, you can use the example entrypoint similar to the Scenario usage above. Factorio will run once, converting the Scenario to a saved Map in your saves directory. A restart of the docker image using the standard options will then load that map, just as if the scenario were just started by the Scenarios example noted above.
|
## Advanced usage
|
||||||
|
|
||||||
```shell
|
### Without map persistence
|
||||||
|
|
||||||
|
This will generate a new random map with default settings.
|
||||||
|
|
||||||
|
```
|
||||||
docker run -d \
|
docker run -d \
|
||||||
-p 34197:34197/udp \
|
-p [PORT]:34197/udp \
|
||||||
-p 27015:27015/tcp \
|
dtandersen/factorio
|
||||||
-v /opt/factorio:/factorio \
|
|
||||||
--name factorio \
|
|
||||||
--restart=always \
|
|
||||||
--entrypoint "/scenario2map.sh" \
|
|
||||||
factoriotools/factorio
|
|
||||||
MyScenarioName
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### RCON
|
### With map persistence
|
||||||
|
|
||||||
Set the RCON password in the `rconpw` file. A random password is generated if `rconpw` doesn't exist.
|
This will generate a new random map with default settings and save it onto the volume.
|
||||||
|
Replace [PATH] with a path to a folder on the host where the map will be saved.
|
||||||
|
|
||||||
To change the password, stop the server, modify `rconpw`, and restart the server.
|
```
|
||||||
|
docker run -d \
|
||||||
To "disable" RCON don't expose port 27015, i.e. start the server without `-p 27015:27015/tcp`. RCON is still running, but nobody can to connect to it.
|
-v [PATH]:/opt/factorio/saves \
|
||||||
|
-p [PORT]:34197/udp \
|
||||||
### Whitelisting (0.15.3+)
|
dtandersen/factorio
|
||||||
|
|
||||||
Create file `config/server-whitelist.json` and add the whitelisted users.
|
|
||||||
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
"you",
|
|
||||||
"friend"
|
|
||||||
]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Banlisting (0.17.1+)
|
### With existing map
|
||||||
|
|
||||||
Create file `config/server-banlist.json` and add the banlisted users.
|
It's the same as above, it takes the last modified file which contains the word save in the filename as current save when booting the server. This allows when upgrading the container to take the last save, you don't have to rename the last autosave as save.zip
|
||||||
|
|
||||||
```json
|
```
|
||||||
[
|
docker run -d \
|
||||||
"bad_person",
|
-v [PATH]:/opt/factorio/saves \
|
||||||
"other_bad_person"
|
-p [PORT]:34197/udp \
|
||||||
]
|
dtandersen/factorio
|
||||||
```
|
```
|
||||||
|
|
||||||
### Adminlisting (0.17.1+)
|
### Autosave interval
|
||||||
|
|
||||||
Create file `config/server-adminlist.json` and add the adminlisted users.
|
You can set the autosave interval. By default it is set at 2 minutes bud you can change it by launching the container with the `FACTORIO_AUTOSAVE_INTERVAL` variable to whatever suits you best.
|
||||||
|
|
||||||
```json
|
```
|
||||||
[
|
docker run -d \
|
||||||
"you",
|
--env FACTORIO_AUTOSAVE_INTERVAL=[NUMBER] \
|
||||||
"friend"
|
-p [PORT]:34197/udp \
|
||||||
]
|
dtandersen/factorio
|
||||||
```
|
```
|
||||||
|
|
||||||
### Customize configuration files (0.17.x+)
|
Where [NUMBER] is the number of minutes between autosaves.
|
||||||
|
|
||||||
Out-of-the box, factorio does not support environment variables inside the configuration files. A workaround is the usage of `envsubst` which generates the configuration files dynamically during startup from environment variables set in docker-compose:
|
### Autosave slots
|
||||||
|
|
||||||
Example which replaces the server-settings.json:
|
You can set the number of autosave slots. By default it is set at 3 slots bud you can change it by launching the container with the `FACTORIO_AUTOSAVE_SLOTS` variable to whatever suits you best.
|
||||||
|
|
||||||
```yaml
|
```
|
||||||
factorio_1:
|
docker run -d \
|
||||||
image: factoriotools/factorio
|
--env FACTORIO_AUTOSAVE_SLOTS=[NUMBER] \
|
||||||
ports:
|
-p [PORT]:34197/udp \
|
||||||
- "34197:34197/udp"
|
dtandersen/factorio
|
||||||
volumes:
|
|
||||||
- /opt/factorio:/factorio
|
|
||||||
- ./server-settings.json:/server-settings.json
|
|
||||||
environment:
|
|
||||||
- INSTANCE_NAME=Your Instance's Name
|
|
||||||
- INSTANCE_DESC=Your Instance's Description
|
|
||||||
entrypoint: /bin/sh -c "mkdir -p /factorio/config && envsubst < /server-settings.json > /factorio/config/server-settings.json && exec /docker-entrypoint.sh"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The `server-settings.json` file may then contain the variable references like this:
|
Where [NUMBER] is the number of autosave slots.
|
||||||
|
|
||||||
```json
|
### Mounting mod volume
|
||||||
"name": "${INSTANCE_NAME}",
|
|
||||||
"description": "${INSTANCE_DESC}",
|
As everybody knows about factorio is you can add mods to it. Now you can also do it in this docker image by mounting a volume.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -d \
|
||||||
|
-v [PATH]:/opt/factorio/mods \
|
||||||
|
-p [PORT]:34197/udp \
|
||||||
|
dtandersen/factorio
|
||||||
```
|
```
|
||||||
|
|
||||||
## Container Details
|
Where [PATH] is the path to the folder with your mods.
|
||||||
|
|
||||||
The philosophy is to [keep it simple](http://wiki.c2.com/?KeepItSimple).
|
### Allowing in-game commands
|
||||||
|
|
||||||
* The server should bootstrap itself.
|
I've always disabled in-game commands because I think it is like cheating, however, you can enable them by setting the the `FACTORIO_DISSALOW_COMMANDS` variable to "false".
|
||||||
* Prefer configuration files over environment variables.
|
|
||||||
* Use one volume for data.
|
|
||||||
|
|
||||||
### Volumes
|
```
|
||||||
|
docker run -d \
|
||||||
To keep things simple, the container uses a single volume mounted at `/factorio`. This volume stores configuration, mods, and saves.
|
--env FACTORIO_DISSALOW_COMMANDS=false \
|
||||||
|
-p [PORT]:34197/udp \
|
||||||
The files in this volume should be owned by the factorio user, uid 845.
|
dtandersen/factorio
|
||||||
|
|
||||||
```text
|
|
||||||
factorio
|
|
||||||
|-- config
|
|
||||||
| |-- map-gen-settings.json
|
|
||||||
| |-- map-settings.json
|
|
||||||
| |-- rconpw
|
|
||||||
| |-- server-adminlist.json
|
|
||||||
| |-- server-banlist.json
|
|
||||||
| |-- server-settings.json
|
|
||||||
| `-- server-whitelist.json
|
|
||||||
|-- mods
|
|
||||||
| `-- fancymod.zip
|
|
||||||
`-- saves
|
|
||||||
`-- _autosave1.zip
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker Compose
|
### Activating no-auto-pause in the game when no one is on the server
|
||||||
|
|
||||||
[Docker Compose](https://docs.docker.com/compose/install/) is an easy way to run Docker containers.
|
I do not recommend this feature, bud it can make the game more difficult if you're up for a challenge :-). Just set the `FACTORIO_NO_AUTO_PAUSE` variable to "true".
|
||||||
|
|
||||||
First get a [docker-compose.yml](https://github.com/factoriotools/factorio-docker/blob/master/0.17/docker-compose.yml) file. To get it from this repository:
|
```
|
||||||
|
docker run -d \
|
||||||
```shell
|
--env FACTORIO_NO_AUTO_PAUSE=true \
|
||||||
git clone https://github.com/factoriotools/factorio-docker.git
|
-p [PORT]:34197/udp \
|
||||||
cd docker_factorio_server/0.17
|
dtandersen/factorio
|
||||||
```
|
```
|
||||||
|
|
||||||
Or make your own:
|
### Logs
|
||||||
|
|
||||||
```shell
|
Sometimes it's useful to see the logs of a running container:
|
||||||
version: '2'
|
|
||||||
services:
|
```
|
||||||
factorio:
|
docker exec -it [CONTAINER] tail -f /opt/factorio/factorio-current.log
|
||||||
image: factoriotools/factorio
|
|
||||||
ports:
|
|
||||||
- "34197:34197/udp"
|
|
||||||
- "27015:27015/tcp"
|
|
||||||
volumes:
|
|
||||||
- /opt/factorio:/factorio
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Now cd to the directory with docker-compose.yml and run:
|
# Credits
|
||||||
|
|
||||||
```shell
|
Based on [Zopanix' Factorio Server](https://github.com/zopanix/docker_factorio_server).
|
||||||
sudo mkdir -p /opt/factorio
|
|
||||||
sudo chown 845:845 /opt/factorio
|
|
||||||
sudo docker-compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
### Ports
|
|
||||||
|
|
||||||
* `34197/udp` - Game server (required). This can be changed with the `PORT` environment variable.
|
|
||||||
* `27015/tcp` - RCON (optional).
|
|
||||||
|
|
||||||
## LAN Games
|
|
||||||
|
|
||||||
Ensure the `lan` setting in server-settings.json is `true`.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
"visibility":
|
|
||||||
{
|
|
||||||
"public": false,
|
|
||||||
"lan": true
|
|
||||||
},
|
|
||||||
```
|
|
||||||
|
|
||||||
Start the container with the `--network=host` option so clients can automatically find LAN games. Refer to the Quick Start to create the `/opt/factorio` directory.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo docker run -d \
|
|
||||||
--network=host \
|
|
||||||
-p 34197:34197/udp \
|
|
||||||
-p 27015:27015/tcp \
|
|
||||||
-v /opt/factorio:/factorio \
|
|
||||||
--name factorio \
|
|
||||||
--restart=always \
|
|
||||||
factoriotools/factorio
|
|
||||||
```
|
|
||||||
|
|
||||||
## Deploy to other plaforms
|
|
||||||
|
|
||||||
### Vagrant
|
|
||||||
|
|
||||||
[Vagrant](https://www.vagrantup.com/) is a easy way to setup a virtual machine (VM) to run Docker. The [Factorio Vagrant box repository](https://github.com/dtandersen/factorio-lan-vagrant) contains a sample Vagrantfile.
|
|
||||||
|
|
||||||
For LAN games the VM needs an internal IP in order for clients to connect. One way to do this is with a public network. The VM uses DHCP to acquire an IP address. The VM must also forward port 34197.
|
|
||||||
|
|
||||||
```ruby
|
|
||||||
config.vm.network "public_network"
|
|
||||||
config.vm.network "forwarded_port", guest: 34197, host: 34197
|
|
||||||
```
|
|
||||||
|
|
||||||
### Amazon Web Services (AWS) Deployment
|
|
||||||
|
|
||||||
If you're looking for a simple way to deploy this to the Amazon Web Services Cloud, check out the [Factorio Server Deployment (CloudFormation) repository](https://github.com/m-chandler/factorio-spot-pricing). This repository contains a CloudFormation template that will get you up and running in AWS in a matter of minutes. Optionally it uses Spot Pricing so the server is very cheap, and you can easily turn it off when not in use.
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
### My server is listed in the server browser, but nobody can connect
|
|
||||||
|
|
||||||
Check the logs. If there is the line `Own address is RIGHT IP:WRONG PORT`, then this could be caused by the Docker proxy. If the the IP and port is correct it's probably a port forwarding or firewall issue instead.
|
|
||||||
|
|
||||||
By default, Docker routes traffic through a proxy. The proxy changes the source UDP port, so the wrong port is detected. See the forum post *[Incorrect port detected for docker hosted server](https://forums.factorio.com/viewtopic.php?f=49&t=35255)* for details.
|
|
||||||
|
|
||||||
To fix the incorrect port, start the Docker service with the `--userland-proxy=false` switch. Docker will route traffic with iptables rules instead of a proxy. Add the switch to the `DOCKER_OPTS` environment variable or `ExecStart` in the Docker systemd service definition. The specifics vary by operating system.
|
|
||||||
|
|
||||||
### When I run a server on a port besides 34197 nobody can connect from the server browser
|
|
||||||
|
|
||||||
Use the `PORT` environment variable to start the server on the a different port, .e.g. `docker run -e "PORT=34198"`. This changes the source port on the packets used for port detection. `-p 34198:34197` works fine for private servers, but the server browser detects the wrong port.
|
|
||||||
|
|
||||||
## Contributors
|
|
||||||
|
|
||||||
* [dtandersen](https://github.com/dtandersen) - Maintainer
|
|
||||||
* [Fank](https://github.com/Fankserver) - Programmer of the Factorio watchdog that keeps the version up-to-date.
|
|
||||||
* [SuperSandro2000](https://github.com/supersandro2000) - CI Guy, Maintainer and runner of the Factorio watchdog. Contributed version updates and wrote the Travis scripts.
|
|
||||||
* [DBendit](https://github.com/DBendit/docker_factorio_server) - Coded admin list, ban list support and contributed version updates
|
|
||||||
* [Zopanix](https://github.com/zopanix/docker_factorio_server) - Original Author
|
|
||||||
* [Rfvgyhn](https://github.com/Rfvgyhn/docker-factorio) - Coded randomly generated RCON password
|
|
||||||
* [gnomus](https://github.com/gnomus/docker_factorio_server) - Coded wite listing support
|
|
||||||
* [bplein](https://github.com/bplein/docker_factorio_server) - Coded scenario support
|
|
||||||
* [jaredledvina](https://github.com/jaredledvina/docker_factorio_server) - Contributed version updates
|
|
||||||
* [carlbennett](https://github.com/carlbennett) - Contributed version updates and bugfixes
|
|
||||||
|
99
build.sh
99
build.sh
@ -1,99 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eoux pipefail
|
|
||||||
|
|
||||||
if [[ -z ${1:-} && -n ${CI:-} ]]; then
|
|
||||||
echo 'Usage: ./build.sh VERSION_SHORT'
|
|
||||||
exit 1
|
|
||||||
elif [[ ${CI:-} == true || -n ${1:-} ]]; then
|
|
||||||
VERSION_SHORT="$1"
|
|
||||||
else
|
|
||||||
VERSION_SHORT=$(find . -maxdepth 1 -type d | sort | tail -1 | grep -o "[[0-9]].[[0-9]]*")
|
|
||||||
EXTRA_TAG=latest
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$VERSION_SHORT" || exit 1
|
|
||||||
|
|
||||||
VERSION=$(grep -oP '[0-9]+\.[0-9]+\.[0-9]+' Dockerfile | head -1)
|
|
||||||
DOCKER_REPO=factoriotools/factorio
|
|
||||||
|
|
||||||
if [[ ${TRAVIS_PULL_REQUEST:-} == true ]]; then
|
|
||||||
TAGS="$DOCKER_REPO:$TRAVIS_PULL_REQUEST_SLUG"
|
|
||||||
else
|
|
||||||
if [[ -n ${CI:-} ]]; then
|
|
||||||
# we are either on master or on a tag build
|
|
||||||
if [[ ${TRAVIS_BRANCH:-} == master || ${TRAVIS_BRANCH:-} == "$VERSION" ]]; then
|
|
||||||
TAGS="-t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT"
|
|
||||||
# we are on an incremental build of a tag
|
|
||||||
elif [[ $VERSION == "${TRAVIS_BRANCH%-*}" ]]; then
|
|
||||||
TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH -t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT"
|
|
||||||
# we build a other branch than master and exclude dependabot branches from tags cause the / is not supported by docker
|
|
||||||
elif [[ -n ${TRAVIS_BRANCH:-} && ! $TRAVIS_BRANCH =~ "/" ]]; then
|
|
||||||
TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# we are not in CI and tag version and version short
|
|
||||||
TAGS="-t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n ${EXTRA_TAG:-} ]]; then
|
|
||||||
IFS=","
|
|
||||||
for TAG in $EXTRA_TAG; do
|
|
||||||
TAGS+=" -t $DOCKER_REPO:$TAG"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${STABLE:-} == "$VERSION" ]]; then
|
|
||||||
TAGS+=" -t $DOCKER_REPO:stable"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# shellcheck disable=SC2068
|
|
||||||
eval docker build . ${TAGS[@]:-}
|
|
||||||
docker images
|
|
||||||
|
|
||||||
# remove -1 from incremental tag
|
|
||||||
# eg before: 0.18.24-1, after 0.18.24
|
|
||||||
if [[ ${TRAVIS_BRANCH:-} ]]; then
|
|
||||||
TRAVIS_BRANCH_VERSION=${TRAVIS_BRANCH%-*}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# only push when:
|
|
||||||
# or we build a tag and we don't build a PR
|
|
||||||
if [[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" && ${TRAVIS_PULL_REQUEST_BRANCH:-} == "" ]] ||
|
|
||||||
# or we are not in CI
|
|
||||||
[[ -z ${CI:-} ]]; then
|
|
||||||
|
|
||||||
if [[ ${CI:-} == true ]]; then
|
|
||||||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|
||||||
fi
|
|
||||||
|
|
||||||
# push a tag on a branch other than master except dependabot branches cause docker does not support /
|
|
||||||
if [[ -n ${TRAVIS_BRANCH:-} && $VERSION != "${TRAVIS_BRANCH_VERSION:-}" && ${TRAVIS_BRANCH:-} != "master" && ! ${TRAVIS_BRANCH:-} =~ "/" ]]; then
|
|
||||||
docker push "$DOCKER_REPO:$TRAVIS_BRANCH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# push an incremental tag
|
|
||||||
# eg 0.18.24-1
|
|
||||||
if [[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" ]]; then
|
|
||||||
docker push "$DOCKER_REPO:$TRAVIS_BRANCH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# only push on tags or when manually running the script
|
|
||||||
if [[ -n ${TRAVIS_TAG:-} || -z ${CI:-} ]]; then
|
|
||||||
docker push "$DOCKER_REPO:$VERSION"
|
|
||||||
docker push "$DOCKER_REPO:$VERSION_SHORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n ${EXTRA_TAG:-} ]]; then
|
|
||||||
IFS=","
|
|
||||||
for TAG in $EXTRA_TAG; do
|
|
||||||
docker push "$DOCKER_REPO:$TAG"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${STABLE:-} == "$VERSION" ]]; then
|
|
||||||
docker push "$DOCKER_REPO:stable"
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl -X POST https://hooks.microbadger.com/images/factoriotools/factorio/TmmKGNp8jKcFqZvcJhTCIAJVluw=
|
|
||||||
fi
|
|
92
factorio.crt
Normal file
92
factorio.crt
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIGCDCCA/CgAwIBAgIQKy5u6tl1NmwUim7bo3yMBzANBgkqhkiG9w0BAQwFADCB
|
||||||
|
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
|
||||||
|
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
|
||||||
|
BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTQwMjEy
|
||||||
|
MDAwMDAwWhcNMjkwMjExMjM1OTU5WjCBkDELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
|
||||||
|
EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
|
||||||
|
Q09NT0RPIENBIExpbWl0ZWQxNjA0BgNVBAMTLUNPTU9ETyBSU0EgRG9tYWluIFZh
|
||||||
|
bGlkYXRpb24gU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
|
||||||
|
ADCCAQoCggEBAI7CAhnhoFmk6zg1jSz9AdDTScBkxwtiBUUWOqigwAwCfx3M28Sh
|
||||||
|
bXcDow+G+eMGnD4LgYqbSRutA776S9uMIO3Vzl5ljj4Nr0zCsLdFXlIvNN5IJGS0
|
||||||
|
Qa4Al/e+Z96e0HqnU4A7fK31llVvl0cKfIWLIpeNs4TgllfQcBhglo/uLQeTnaG6
|
||||||
|
ytHNe+nEKpooIZFNb5JPJaXyejXdJtxGpdCsWTWM/06RQ1A/WZMebFEh7lgUq/51
|
||||||
|
UHg+TLAchhP6a5i84DuUHoVS3AOTJBhuyydRReZw3iVDpA3hSqXttn7IzW3uLh0n
|
||||||
|
c13cRTCAquOyQQuvvUSH2rnlG51/ruWFgqUCAwEAAaOCAWUwggFhMB8GA1UdIwQY
|
||||||
|
MBaAFLuvfgI9+qbxPISOre44mOzZMjLUMB0GA1UdDgQWBBSQr2o6lFoL2JDqElZz
|
||||||
|
30O0Oija5zAOBgNVHQ8BAf8EBAMCAYYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNV
|
||||||
|
HSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwGwYDVR0gBBQwEjAGBgRVHSAAMAgG
|
||||||
|
BmeBDAECATBMBgNVHR8ERTBDMEGgP6A9hjtodHRwOi8vY3JsLmNvbW9kb2NhLmNv
|
||||||
|
bS9DT01PRE9SU0FDZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDBxBggrBgEFBQcB
|
||||||
|
AQRlMGMwOwYIKwYBBQUHMAKGL2h0dHA6Ly9jcnQuY29tb2RvY2EuY29tL0NPTU9E
|
||||||
|
T1JTQUFkZFRydXN0Q0EuY3J0MCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5jb21v
|
||||||
|
ZG9jYS5jb20wDQYJKoZIhvcNAQEMBQADggIBAE4rdk+SHGI2ibp3wScF9BzWRJ2p
|
||||||
|
mj6q1WZmAT7qSeaiNbz69t2Vjpk1mA42GHWx3d1Qcnyu3HeIzg/3kCDKo2cuH1Z/
|
||||||
|
e+FE6kKVxF0NAVBGFfKBiVlsit2M8RKhjTpCipj4SzR7JzsItG8kO3KdY3RYPBps
|
||||||
|
P0/HEZrIqPW1N+8QRcZs2eBelSaz662jue5/DJpmNXMyYE7l3YphLG5SEXdoltMY
|
||||||
|
dVEVABt0iN3hxzgEQyjpFv3ZBdRdRydg1vs4O2xyopT4Qhrf7W8GjEXCBgCq5Ojc
|
||||||
|
2bXhc3js9iPc0d1sjhqPpepUfJa3w/5Vjo1JXvxku88+vZbrac2/4EjxYoIQ5QxG
|
||||||
|
V/Iz2tDIY+3GH5QFlkoakdH368+PUq4NCNk+qKBR6cGHdNXJ93SrLlP7u3r7l+L4
|
||||||
|
HyaPs9Kg4DdbKDsx5Q5XLVq4rXmsXiBmGqW5prU5wfWYQ//u+aen/e7KJD2AFsQX
|
||||||
|
j4rBYKEMrltDR5FL1ZoXX/nUh8HCjLfn4g8wGTeGrODcQgPmlKidrv0PJFGUzpII
|
||||||
|
0fxQ8ANAe4hZ7Q7drNJ3gjTcBpUC2JD5Leo31Rpg0Gcg19hCC0Wvgmje3WYkN5Ap
|
||||||
|
lBlGGSW4gNfL1IYoakRwJiNiqZ+Gb7+6kHDSVneFeO/qJakXzlByjAA6quPbYzSf
|
||||||
|
+AZxAeKCINT+b72x
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFdDCCBFygAwIBAgIQJ2buVutJ846r13Ci/ITeIjANBgkqhkiG9w0BAQwFADBv
|
||||||
|
MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk
|
||||||
|
ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF
|
||||||
|
eHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFow
|
||||||
|
gYUxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
|
||||||
|
BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMSswKQYD
|
||||||
|
VQQDEyJDT01PRE8gUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkq
|
||||||
|
hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAkehUktIKVrGsDSTdxc9EZ3SZKzejfSNw
|
||||||
|
AHG8U9/E+ioSj0t/EFa9n3Byt2F/yUsPF6c947AEYe7/EZfH9IY+Cvo+XPmT5jR6
|
||||||
|
2RRr55yzhaCCenavcZDX7P0N+pxs+t+wgvQUfvm+xKYvT3+Zf7X8Z0NyvQwA1onr
|
||||||
|
ayzT7Y+YHBSrfuXjbvzYqOSSJNpDa2K4Vf3qwbxstovzDo2a5JtsaZn4eEgwRdWt
|
||||||
|
4Q08RWD8MpZRJ7xnw8outmvqRsfHIKCxH2XeSAi6pE6p8oNGN4Tr6MyBSENnTnIq
|
||||||
|
m1y9TBsoilwie7SrmNnu4FGDwwlGTm0+mfqVF9p8M1dBPI1R7Qu2XK8sYxrfV8g/
|
||||||
|
vOldxJuvRZnio1oktLqpVj3Pb6r/SVi+8Kj/9Lit6Tf7urj0Czr56ENCHonYhMsT
|
||||||
|
8dm74YlguIwoVqwUHZwK53Hrzw7dPamWoUi9PPevtQ0iTMARgexWO/bTouJbt7IE
|
||||||
|
IlKVgJNp6I5MZfGRAy1wdALqi2cVKWlSArvX31BqVUa/oKMoYX9w0MOiqiwhqkfO
|
||||||
|
KJwGRXa/ghgntNWutMtQ5mv0TIZxMOmm3xaG4Nj/QN370EKIf6MzOi5cHkERgWPO
|
||||||
|
GHFrK+ymircxXDpqR+DDeVnWIBqv8mqYqnK8V0rSS527EPywTEHl7R09XiidnMy/
|
||||||
|
s1Hap0flhFMCAwEAAaOB9DCB8TAfBgNVHSMEGDAWgBStvZh6NLQm9/rEJlTvA73g
|
||||||
|
JMtUGjAdBgNVHQ4EFgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQD
|
||||||
|
AgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAGBgRVHSAAMEQGA1UdHwQ9
|
||||||
|
MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9BZGRUcnVzdEV4dGVy
|
||||||
|
bmFsQ0FSb290LmNybDA1BggrBgEFBQcBAQQpMCcwJQYIKwYBBQUHMAGGGWh0dHA6
|
||||||
|
Ly9vY3NwLnVzZXJ0cnVzdC5jb20wDQYJKoZIhvcNAQEMBQADggEBAGS/g/FfmoXQ
|
||||||
|
zbihKVcN6Fr30ek+8nYEbvFScLsePP9NDXRqzIGCJdPDoCpdTPW6i6FtxFQJdcfj
|
||||||
|
Jw5dhHk3QBN39bSsHNA7qxcS1u80GH4r6XnTq1dFDK8o+tDb5VCViLvfhVdpfZLY
|
||||||
|
Uspzgb8c8+a4bmYRBbMelC1/kZWSWfFMzqORcUx8Rww7Cxn2obFshj5cqsQugsv5
|
||||||
|
B5a6SE2Q8pTIqXOi6wZ7I53eovNNVZ96YUWYGGjHXkBrI/V5eu+MtWuLt29G9Hvx
|
||||||
|
PUsE2JOAWVrgQSQdso8VYFhH2+9uRv0V9dlfmrPb2LjkQLPNlzmuhbsdjrzch5vR
|
||||||
|
pu/xO28QOG8=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
|
||||||
|
MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
|
||||||
|
IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
|
||||||
|
MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
|
||||||
|
FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
|
||||||
|
bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
|
||||||
|
dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
|
||||||
|
H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
|
||||||
|
uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
|
||||||
|
mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
|
||||||
|
a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
|
||||||
|
E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
|
||||||
|
WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
|
||||||
|
VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
|
||||||
|
Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
|
||||||
|
cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
|
||||||
|
IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
|
||||||
|
AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
|
||||||
|
YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
|
||||||
|
6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
|
||||||
|
Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
|
||||||
|
c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
|
||||||
|
mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
|
||||||
|
-----END CERTIFICATE-----
|
2
lint.sh
2
lint.sh
@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
git ls-files --exclude='*Dockerfile' --ignored | xargs --max-lines=1 ./hadolint
|
|
43
smart_launch.sh
Executable file
43
smart_launch.sh
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -f /opt/factorio/saves/save.zip ]
|
||||||
|
then
|
||||||
|
echo "###"
|
||||||
|
echo "# Using existing map [save.zip]"
|
||||||
|
echo "###"
|
||||||
|
echo "###"
|
||||||
|
echo "# Finding latest map"
|
||||||
|
echo "###"
|
||||||
|
last_save=$(ls /opt/factorio/saves -lt | grep save |head -1 |awk '{print $(NF)}')
|
||||||
|
else
|
||||||
|
echo "###"
|
||||||
|
echo "# Creating a new map [save.zip]"
|
||||||
|
echo "###"
|
||||||
|
/opt/factorio/bin/x64/factorio --create save.zip
|
||||||
|
last_save="save.zip"
|
||||||
|
echo "###"
|
||||||
|
echo "# New map created [save.zip]"
|
||||||
|
echo "###"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Checking options
|
||||||
|
if [ "$FACTORIO_DISSALOW_COMMANDS" == false ]; then
|
||||||
|
disallow_commands=""
|
||||||
|
else
|
||||||
|
disallow_commands="--disallow-commands"
|
||||||
|
fi
|
||||||
|
if [ "$FACTORIO_NO_AUTO_PAUSE" == true ]; then
|
||||||
|
no_auto_pause="--no-auto-pause"
|
||||||
|
else
|
||||||
|
no_auto_pause=""
|
||||||
|
fi
|
||||||
|
echo "###"
|
||||||
|
echo "# Launching Game"
|
||||||
|
echo "###"
|
||||||
|
exec /opt/factorio/bin/x64/factorio \
|
||||||
|
$disallow_commands \
|
||||||
|
$no_auto_pause \
|
||||||
|
--autosave-interval ${FACTORIO_AUTOSAVE_INTERVAL} \
|
||||||
|
--autosave-slots ${FACTORIO_AUTOSAVE_SLOTS} \
|
||||||
|
--start-server \
|
||||||
|
$last_save
|
@ -1,35 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# This script is licensed under MIT and was originally written by Peter Evans. You can find a copy of the MIT license next to this file.
|
|
||||||
# The original file is available on his Github repo under the following link:
|
|
||||||
# https://github.com/peter-evans/dockerhub-description/blob/84d38211e27bb9b9effefa718f8c734db8adc5e1/entrypoint.sh
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
|
|
||||||
# Set the default path to README.md
|
|
||||||
README_FILEPATH=${README_FILEPATH:="./README.md"}
|
|
||||||
|
|
||||||
# Check the file size
|
|
||||||
if [[ $(wc -c <${README_FILEPATH}) -gt 25000 ]]; then
|
|
||||||
echo "File size exceeds the maximum allowed 25000 bytes"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Acquire a token for the Docker Hub API
|
|
||||||
echo "Acquiring token"
|
|
||||||
# shellcheck disable=2089
|
|
||||||
LOGIN_PAYLOAD="{\"username\": \"${DOCKERHUB_USERNAME}\", \"password\": \"${DOCKERHUB_PASSWORD}\"}"
|
|
||||||
TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d "${LOGIN_PAYLOAD}" https://hub.docker.com/v2/users/login/ | jq -r .token)
|
|
||||||
|
|
||||||
# Send a PATCH request to update the description of the repository
|
|
||||||
echo "Sending PATCH request"
|
|
||||||
REPO_URL="https://hub.docker.com/v2/repositories/${DOCKERHUB_REPOSITORY}/"
|
|
||||||
RESPONSE_CODE=$(curl -s --write-out "%{response_code}" --output /dev/null -H "Authorization: JWT ${TOKEN}" -X PATCH --data-urlencode full_description@${README_FILEPATH} "${REPO_URL}")
|
|
||||||
echo "Received response code: $RESPONSE_CODE"
|
|
||||||
|
|
||||||
if [[ $RESPONSE_CODE -eq 200 ]]; then
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
Reference in New Issue
Block a user