Compare commits

...

79 Commits

Author SHA1 Message Date
012180bae6 proxy details 2016-11-02 15:37:22 -07:00
ff2bfae329 keep it simple 2016-11-02 12:20:47 -07:00
0309a94ed9 add 0.13 version 2016-11-01 14:01:30 -07:00
d10a30c01f experimental 0.13 version 2016-11-01 20:47:26 +00:00
52840aff65 clean /tmp/factorio 2016-11-01 20:32:57 +00:00
07b066754d show contents of /tmp/factorio 2016-11-01 20:32:37 +00:00
c6c76b5a41 Merge branch '0.14-dev' of github.com:dtandersen/docker_factorio_server into 0.14-dev 2016-11-01 20:32:00 +00:00
9fbd7d92bc use sh instead of bash 2016-11-01 20:31:24 +00:00
ef731d433a minor text changes 2016-11-01 10:15:18 -07:00
35ee88bf7f more on save files 2016-10-31 13:30:08 -07:00
fb0d9e444b first save is _autosave1.zip 2016-10-31 13:28:13 -07:00
b99b296865 first save is _autosave1.zip 2016-10-31 20:27:11 +00:00
7bedca570d pretty up tree 2016-10-31 13:20:47 -07:00
9a0de68628 rcon docs 2016-10-31 13:15:24 -07:00
08a2732ee3 update docs for rcon 2016-10-31 13:07:26 -07:00
c8d64cc1db set rcon password 2016-10-31 19:59:57 +00:00
f096877853 run with tini 2016-10-31 19:55:01 +00:00
bf83c650bc minor text changes 2016-10-27 16:14:16 -07:00
7205f9fb2a fix links 2016-10-27 16:07:35 -07:00
f9fbd2a59f updated to 0.14.17 2016-10-27 22:37:09 +00:00
9fcbb9ba24 move stuff to 0.14 2016-10-27 14:52:54 -07:00
60308b60fc minor text changes 2016-10-27 12:41:35 -07:00
f170800d8f Merge branch 'master' of github.com:dtandersen/docker_factorio_server into 0.14.16-dev 2016-10-27 12:28:35 -07:00
4f71f75b72 minor text changes 2016-10-27 12:27:42 -07:00
d73235ea9e Merge pull request #1 from dtandersen/0.14.16-dev
added 0.14 version
2016-10-27 12:06:17 -07:00
7ea6fa3274 added 0.14 version 2016-10-27 11:58:19 -07:00
a511769e70 minor text changes 2016-10-27 11:49:22 -07:00
c5f4b8860e update badges 2016-10-27 11:48:00 -07:00
6e92b0f850 troubleshooting 2016-10-27 11:44:05 -07:00
97cf42b229 minor text changes 2016-10-27 11:36:55 -07:00
007503b7c6 minor text changes 2016-10-27 11:30:19 -07:00
4b6fc187dc minor text changes 2016-10-26 17:36:00 -07:00
dc0034f00d Merge remote-tracking branch 'remotes/origin/0.14.16'
# Conflicts:
#	Dockerfile
#	README.md
2016-10-26 17:15:54 -07:00
487b0d7bd6 follow symlink 2016-10-27 00:08:21 +00:00
1c82a0fb65 remove sample settings 2016-10-26 16:58:31 -07:00
6bfeb9dabf docs 2016-10-26 16:56:00 -07:00
33a9379f9f format list 2016-10-26 16:53:13 -07:00
35eb0fbfb7 format list 2016-10-26 16:52:05 -07:00
ff1c0a954e doc updates 2016-10-26 16:46:21 -07:00
4280ef8cfc revise docs 2016-10-26 16:41:54 -07:00
2cefc1544c describe new volume structure 2016-10-26 16:30:32 -07:00
1c07730c4e use one main /factorio volume 2016-10-26 23:15:09 +00:00
cf4d1cb218 log example 2016-10-26 15:08:06 -07:00
d52709ff0f remove curl after use 2016-10-26 15:08:06 -07:00
7992ded59e log example 2016-10-26 14:44:56 -07:00
06e168f899 remove curl after use 2016-10-26 18:32:06 +00:00
a3ad4c25a1 Merge remote-tracking branch 'remotes/origin/0.14.16' 2016-10-26 10:48:08 -07:00
4cde518f36 specify port 2016-10-26 17:46:34 +00:00
616d78c45f mount volumes to /tmp 2016-10-26 17:27:28 +00:00
730bb5d604 fixed json syntax 2016-10-26 17:27:11 +00:00
f379330b7c fixed check for saves 2016-10-26 17:26:47 +00:00
a9bb898fb2 specify location of settings 2016-10-25 21:57:49 -07:00
6c787666a4 Merge branch '0.14.16' 2016-10-25 14:08:09 -07:00
1a4e5df5a7 add badges 2016-10-25 13:48:02 -07:00
52dcbafedb Merge remote-tracking branch 'remotes/origin/0.14.16'
# Conflicts:
#	Dockerfile
#	README.md
2016-10-25 13:39:45 -07:00
d88da771e9 update checksum 2016-10-25 13:35:32 -07:00
f2c9fbb10c update example config 2016-10-25 13:34:55 -07:00
47d6cfb2b1 add back exec 2016-10-25 12:33:45 -07:00
1e97a95302 removed exec 2016-10-25 19:30:12 +00:00
3f8621f896 update docs 2016-10-25 11:59:50 -07:00
05a3ca45e4 typo 2016-10-25 11:40:53 -07:00
fc42bf7863 rename entrypoint 2016-10-25 18:39:28 +00:00
1dbac7408f utility script 2016-10-25 18:31:07 +00:00
9261339510 simplify startup 2016-10-25 18:30:24 +00:00
8e1a044172 update alpine 2016-10-25 18:02:33 +00:00
b85b998062 doc update 2016-10-25 10:28:04 -07:00
f3b4d8e445 example config 2016-10-25 10:11:09 -07:00
4a48f9234f updated readme 2016-10-25 17:03:50 +00:00
8d90253929 update readme 2016-10-25 16:58:54 +00:00
aca4709d7f use server-settings.json for settings 2016-10-25 16:49:23 +00:00
a2ebf4db2d updated to 0.14.14 2016-10-25 15:51:34 +00:00
bbacd8e67d Merge pull request #8 from bkach/0.12.33
Updated to 0.12.33
2016-05-04 07:23:54 +02:00
eb0d08c3c3 Corrected SHA1 2016-05-04 01:43:57 +01:00
dc53f6a61f Updated to 0.12.33
- Updated Dockerfile and SHA1
- Updated README
2016-05-03 15:00:35 +01:00
92d459b14d Merge pull request #7 from dtandersen/0.12.32_update
0.12.32 update
2016-04-30 17:35:26 +02:00
ef55d08655 updated readme to 0.12.32 2016-04-29 16:08:48 -07:00
c5ae7515fe updated version and sha1 for 0.12.32 2016-04-29 16:07:55 -07:00
ec17a32638 updated readme for 0.12.32 2016-04-29 15:56:19 -07:00
15da4f79f5 updated version and sha1 for 0.12.32 2016-04-29 15:51:47 -07:00
15 changed files with 299 additions and 164 deletions

28
0.13/Dockerfile Normal file
View File

@ -0,0 +1,28 @@
FROM frolvlad/alpine-glibc:alpine-3.4
MAINTAINER https://github.com/dtandersen/docker_factorio_server
COPY ./factorio.crt /opt/factorio.crt
ENV VERSION=0.13.20 \
SHA1=59ed0edb3f62f0f41a01fc291959b0a8b44cf631
RUN apk --no-cache add curl tini pwgen && \
curl -sSL --cacert /opt/factorio.crt \
https://www.factorio.com/get-download/$VERSION/headless/linux64 \
-o /tmp/factorio_headless_x64_$VERSION.tar.gz && \
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
0.13/build.sh Executable file
View File

@ -0,0 +1 @@
sudo docker build -t dtandersen/factorio:0.13-dev .

1
0.13/clean.sh Executable file
View File

@ -0,0 +1 @@
sudo rm -rf /tmp/factorio

35
0.13/docker-entrypoint.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/sh -x
set -e
SAVES=/factorio/saves
CONFIG=/factorio/config
mkdir -p $SAVES
mkdir -p /factorio/mods
mkdir -p $CONFIG
if [ ! -f $CONFIG/rconpw ]; then
echo $(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)"

5
0.13/run.sh Executable file
View File

@ -0,0 +1,5 @@
sudo docker run --rm -it \
-v /tmp/factorio:/factorio \
--name factorio \
dtandersen/factorio:0.13-dev "$@"
find /tmp/factorio -type f

28
0.14/Dockerfile Normal file
View File

@ -0,0 +1,28 @@
FROM frolvlad/alpine-glibc:alpine-3.4
MAINTAINER https://github.com/dtandersen/docker_factorio_server
COPY ./factorio.crt /opt/factorio.crt
ENV VERSION=0.14.17 \
SHA1=ffb248fabed345aafadb6a8cdef3684312ac240f
RUN apk --no-cache add curl tini pwgen && \
curl -sSL --cacert /opt/factorio.crt \
https://www.factorio.com/get-download/$VERSION/headless/linux64 \
-o /tmp/factorio_headless_x64_$VERSION.tar.gz && \
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
0.14/build.sh Executable file
View File

@ -0,0 +1 @@
sudo docker build -t factorio .

1
0.14/clean.sh Executable file
View File

@ -0,0 +1 @@
sudo rm -rf /tmp/factorio

35
0.14/docker-entrypoint.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/sh -x
set -e
SAVES=/factorio/saves
CONFIG=/factorio/config
mkdir -p $SAVES
mkdir -p /factorio/mods
mkdir -p $CONFIG
if [ ! -f $CONFIG/rconpw ]; then
echo $(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)"

92
0.14/factorio.crt Normal file
View 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/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N0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
-----END CERTIFICATE-----

5
0.14/run.sh Executable file
View File

@ -0,0 +1,5 @@
sudo docker run --rm -it \
-v /tmp/factorio:/factorio \
--name factorio \
factorio "$@"
find /tmp/factorio -type f

View File

@ -1,28 +0,0 @@
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.31 \
FACTORIO_SHA1=2b225302bcea95d541da9057f05acc3d27b0fe79
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"]

160
README.md
View File

@ -1,9 +1,8 @@
# Supported tags and respective `Dockerfile` links
# Factorio [![Docker Pulls](https://img.shields.io/docker/pulls/dtandersen/factorio.svg)](https://hub.docker.com/r/dtandersen/factorio/) [![Docker Stars](https://img.shields.io/docker/stars/dtandersen/factorio.svg)](https://hub.docker.com/r/dtandersen/factorio/)
* `0.12.31`, `latest` [(0.12.31/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/dt_0.12.31/Dockerfile)
* `0.12.30` [(0.12.30/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/dt_0.12.30/Dockerfile)
[![](https://imagelayers.io/badge/dtandersen/factorio:latest.svg)](https://imagelayers.io/?images=dtandersen/factorio:latest 'Get your own badge on imagelayers.io')
* `0.14.17`, `0.14`, `latest` [(0.14.17/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/0.14.17/0.14/Dockerfile)
* `0.14.16` [(0.14.16/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/0.14.16/0.14/Dockerfile)
* `0.13.20`, `0.13`, `stable` [(0.13.20/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/0.13.20/0.13/Dockerfile)
# What is Factorio?
@ -13,137 +12,112 @@ 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.
NOTE: This is only the server. The game is available on [Steam](http://store.steampowered.com/app/427520/).
NOTE: This is only the server. The game is available at [factorio.com](https://www.factorio.com) and [Steam](http://store.steampowered.com/app/427520/).
# Features
* 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.
# How to use this image?
# Usage
## Quick Start
This runs factorio with default settings, and your save will be kept:
Run the server to create the necessary folder structure and configuration files. For this example data is stored in `/tmp/factorio`.
```
docker run -d \
-v [PATH]:/opt/factorio/saves \
-p [PORT]:34197/udp \
dtandersen/factorio
docker run -d -P -v /tmp/factorio:/factorio --name factorio dtandersen/factorio
```
* 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.
For those new to Docker, here is an explanation of the options:
## Advanced usage
* `-d` - Run as a daemon ("detached").
* `-P` - Expose all ports.
* `-v` - Mount `/tmp/factorio` on the local file system to `/factorio` in the container.
* `--name` - Name the container "factorio" (otherwise it has a funny random name).
### Without map persistence
This will generate a new random map with default settings.
Check the logs to see what happened:
```
docker run -d \
-p [PORT]:34197/udp \
dtandersen/factorio
docker logs factorio
```
### With map persistence
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.
Stop the server:
```
docker run -d \
-v [PATH]:/opt/factorio/saves \
-p [PORT]:34197/udp \
dtandersen/factorio
docker stop factorio
```
### With existing map
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
Now there's a `server-settings.json` file in the folder `/tmp/factorio/config`. Modify this to your liking and restart the server:
```
docker run -d \
-v [PATH]:/opt/factorio/saves \
-p [PORT]:34197/udp \
dtandersen/factorio
docker start factorio
```
### Autosave interval
Try to connect to the server. Check the logs if it isn't working.
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.
```
docker run -d \
--env FACTORIO_AUTOSAVE_INTERVAL=[NUMBER] \
-p [PORT]:34197/udp \
dtandersen/factorio
```
## Saves
Where [NUMBER] is the number of minutes between autosaves.
A new map named `_autosave1.zip` is generated the first time the server is started. The `map-gen-settings.json` file in `/tmp/factorio/config` is used for the map settings. On subsequent runs the newest save is used.
### Autosave slots
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.
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.
To generate a new map stop the server, delete all of the saves and restart the server.
```
docker run -d \
--env FACTORIO_AUTOSAVE_SLOTS=[NUMBER] \
-p [PORT]:34197/udp \
dtandersen/factorio
```
Where [NUMBER] is the number of autosave slots.
## Mods
### Mounting mod volume
Copy mods into the mods folder and restart the server.
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
```
## RCON
Where [PATH] is the path to the folder with your mods.
Set the RCON password in the `rconpw` file. A random password is generated if `rconpw` doesn't exist.
### Allowing in-game commands
To change the password stop the server, modify `rconpw`, and restart the server.
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".
To "disable" RCON don't expose port 27015, i.e. start the server with `-p 34197:34197/udp` instead of `-P`. RCON still runs, but nobody is able to connect to it.
```
docker run -d \
--env FACTORIO_DISSALOW_COMMANDS=false \
-p [PORT]:34197/udp \
dtandersen/factorio
```
### Activating no-auto-pause in the game when no one is on the server
# Container Details
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".
The philosophy is to [keep it simple](http://wiki.c2.com/?KeepItSimple).
```
docker run -d \
--env FACTORIO_NO_AUTO_PAUSE=true \
-p [PORT]:34197/udp \
dtandersen/factorio
```
* The server should bootstrap itself.
* Prefer configuration files over environment variables.
* Use one volume for data.
### Logs
Sometimes it's useful to see the logs of a running container:
## Volumes
To keep things simple, the container uses a single volume mounted at `/factorio`. This volume stores configuration, mods, and saves.
factorio
|-- config
| |-- map-gen-settings.json
| |-- rconpw
| `-- server-settings.json
|-- mods
| `-- fancymod.zip
`-- saves
`-- _autosave1.zip
## Ports
* `34197/udp` - Factorio clients (required).
* `27015/tcp` - RCON (optional).
## Troubleshooting
**Server is listed in the in-game server browser, but users can't connect**
By default, Docker routes outgoing traffic through a proxy. The source UDP port is changed by the proxy so the server list detects the wrong port. See [Incorrect port detected for docker hosted server](https://forums.factorio.com/viewtopic.php?f=49&t=35255).
To fix this problem, start the Docker service with the `--userland-proxy=false` switch to prevent it from using a proxy. This is typically done by appending the switch to the `DOCKER_OPTS` variable or adding it to the end of `ExecStart` in the systemd service definition. The location of these files varies by OS.
```
docker exec -it [CONTAINER] tail -f /opt/factorio/factorio-current.log
```
# Credits
Based on [Zopanix' Factorio Server](https://github.com/zopanix/docker_factorio_server).
Ideas borrowed from:
* [Zopanix](https://github.com/zopanix/docker_factorio_server)
* [Rfvgyhn](https://github.com/Rfvgyhn/docker-factorio)

View File

@ -1,43 +0,0 @@
#!/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