Compare commits

...

97 Commits

Author SHA1 Message Date
68e8a5f25c Merge branch 'master' of https://github.com/zopanix/docker_factorio_server into dt_0.12.31 2016-04-29 15:48:27 -07:00
b658982c93 Merge pull request #6 from dtandersen/0.12.31_update
updated to 0.12.31
2016-04-27 13:18:07 +02:00
1d3fc75d20 updated imagelayers.io badge url 2016-04-26 15:05:59 -07:00
a4a482ee91 updated dockerfile links 2016-04-26 15:01:32 -07:00
eafe7c08be Merge branch '0.12.31_update' into dt_develop
# Conflicts:
#	Dockerfile
#	README.md
2016-04-26 14:44:56 -07:00
9acfe47d16 updated to 0.12.31 2016-04-26 14:26:18 -07:00
b47b20e834 Revert "Set version to 0.12.29"
This reverts commit 7e0718a332.
2016-04-26 13:51:29 +02:00
7e0718a332 Set version to 0.12.29 2016-04-26 13:48:32 +02:00
ae327add0b Set Version to 0.12.30 2016-04-24 14:14:19 +02:00
efb5eb7afc Set Version to 0.12.29 2016-04-24 14:13:51 +02:00
ec1c4f9455 Set Version to 0.12.28 2016-04-24 14:13:35 +02:00
edf8035ae3 Set Version to 0.12.27 2016-04-24 14:13:14 +02:00
25b41c9f22 Set Version to 0.12.25 2016-04-24 14:12:44 +02:00
228339ec31 Set Version to 0.12.25 2016-04-24 14:12:17 +02:00
755c106b7b Set Version to 0.12.24 2016-04-24 14:11:45 +02:00
f1f76e9ae0 Trying to fix with alpine 2016-04-24 14:06:44 +02:00
26f053451c Fixing some things 2016-04-24 13:42:15 +02:00
c439634ef1 Fixed typo 2016-04-24 13:36:37 +02:00
cc33c84d86 Set version back to 0.12.30 2016-04-24 12:56:23 +02:00
8806ca2160 Set version to 0.12.29 2016-04-24 12:55:53 +02:00
83bf5c4a11 Remove sha1sum 2016-04-24 12:54:12 +02:00
30859d57b8 Added feature alpine with ssl verification and sha1 verification of the image 2016-04-24 12:45:15 +02:00
3e9f74eaac Merge branch 'alpine' 2016-04-14 23:04:50 -07:00
14bbd68a3b how to see logs 2016-04-14 22:54:17 -07:00
d4052bc790 formatted the word dockerfile as code 2016-04-14 22:50:29 -07:00
2fc2b7656d reformat docs 2016-04-14 22:48:52 -07:00
199f6c7f59 added versions to top 2016-04-14 22:45:25 -07:00
d614babc54 added fancy bagde 2016-04-14 22:41:33 -07:00
257e1751c2 added description of factorio 2016-04-14 22:37:25 -07:00
e8e5047490 Merge pull request #4 from dtandersen/autopausetypo2
Fixed spelling of FACTORIO
2016-04-15 07:37:17 +02:00
d089b02941 point to dtandersen repo 2016-04-14 22:23:36 -07:00
6fe77c30da Merge branch 'readme' 2016-04-14 22:14:12 -07:00
a97763a0e1 re-enabled SSL security 2016-04-14 22:06:32 -07:00
602881a0d9 added CA root; removed domain cert 2016-04-14 22:05:59 -07:00
b56ab27e52 factorio ssl cert 2016-04-14 17:55:35 -07:00
5edbcd9055 try using alpine images 2016-04-14 17:55:24 -07:00
059a77574e Corrected a typo.
Merge branch 'autopausetypo2'

# Conflicts:
#	Dockerfile
2016-04-14 16:08:37 -07:00
c1488c61be corrected a typo 2016-04-14 16:04:06 -07:00
fb0d7d955b Moved factorio link to the top 2016-04-14 16:02:34 -07:00
a34b260d15 combined ENVs to reduce layer count 2016-04-14 15:20:14 -07:00
5d5cb71a90 verify SHA1 checksum 2016-04-14 15:03:35 -07:00
ad9c5c37dc fixed spelling of FACTORIO 2016-04-14 14:36:34 -07:00
63a9eb14d2 Merge pull request #2 from guyspronck/master
Updated version to 0.12.30
2016-04-07 10:23:16 +02:00
76eddb14f8 Updated Version number in README 2016-04-06 12:17:42 +02:00
24bd934d98 Updated version in Dockerfile 2016-04-06 12:16:26 +02:00
9c873ac907 Added some env variables to make it more clear 2016-03-28 09:14:53 +02:00
c44a3d1faf Add a todo 2016-03-27 20:52:16 +02:00
926a377146 Removed todo as it is done 2016-03-27 19:25:16 +02:00
52bb117a2b Fixed typo in variable 2016-03-27 19:17:39 +02:00
04c4a6b577 Fixed typo 2016-03-27 19:15:05 +02:00
39c27944be Added no auto pause feature 2016-03-27 19:10:33 +02:00
ba9faac10e Fixed if statement in options 2016-03-27 18:55:08 +02:00
c987fe8769 Fixed small typo 2016-03-27 18:45:29 +02:00
606b537b13 Added dissalow_commands feature 2016-03-27 18:39:55 +02:00
9473de8934 Refactor Dockerfile 2016-03-27 09:02:10 +02:00
6b00a3fc32 Fixed readme 2016-03-27 08:57:43 +02:00
34a99ec43e Fixed readme 2016-03-27 08:56:09 +02:00
2caf5345c2 Gave readme better readebility 2016-03-27 08:50:17 +02:00
8a68a162fe Add a todo 2016-03-27 08:23:46 +02:00
96a6f66445 Fixed typo in dockerfile 2016-03-26 18:52:56 +01:00
e5c351dd14 Added mods feature and refactored readme 2016-03-26 18:45:31 +01:00
eedff789a5 Made a small fix on autosave features 2016-03-26 18:04:55 +01:00
20fcec5783 Fixed minor errors 2016-03-26 15:25:32 +01:00
2bfa89fea1 Added autosave feature 2016-03-26 10:49:27 +01:00
ee99e7d469 corrected readme 2016-03-26 10:23:21 +01:00
817844352d Added text in readme 2016-03-24 10:35:28 +01:00
abd518de79 Added a link in readme 2016-03-24 10:30:17 +01:00
98337ac18f Corrected small typo 2016-03-24 10:00:34 +01:00
2bd0d475eb Added feature to take latest save 2016-03-24 09:43:21 +01:00
2d9d8e17b8 Added current version 2016-03-24 09:42:04 +01:00
48c22aa707 Set version in readme 2016-03-24 08:39:16 +01:00
97feb7acb5 Set version to 0.12.29 2016-03-24 08:26:28 +01:00
5ee0f8d06a Set version to 0.12.28 2016-03-23 09:12:59 +01:00
7230263559 Set factorio in 0.1.27 2016-03-21 11:00:04 +01:00
6f65ae8acc Changed from ubuntu to debian so it would be lighter 2016-03-10 17:44:11 +01:00
2fae0bdb22 Changed readme 2016-03-10 11:35:35 +01:00
4f10d32d7b Made some minor correction on dockerfile 2016-03-10 11:01:15 +01:00
61e3941a5a Changed readme 2016-03-10 10:23:22 +01:00
777cac4849 Set factorio at 0.12.26 2016-03-06 17:48:32 +01:00
9a35472d8a Looking to loose some weight 2016-03-05 14:13:05 +01:00
5b3d17117f Enriched readme 2016-03-04 15:50:01 +01:00
234eea09f0 Fixed typo in dockerfile 2016-03-04 15:28:03 +01:00
c5e0b6b3b5 Removed unsued command 2016-03-04 15:25:20 +01:00
df19b88ba0 Removed unsused command 2016-03-04 15:23:17 +01:00
0a39c756a5 Fixed tar issues and apt issues 2016-03-04 15:21:09 +01:00
0cab74d578 Fixing tar issues 2016-03-04 15:15:28 +01:00
23c26f83ae Fixing tar issues 2016-03-04 14:36:44 +01:00
3de6931817 Fixing some issues with tar 2016-03-04 14:35:05 +01:00
7a370c11e0 Skipped certif verification 2016-03-04 14:29:43 +01:00
1a09531600 Added full path to docker file 2016-03-04 14:21:38 +01:00
ea57f58c3b Get server from site and removed some files 2016-03-04 13:35:29 +01:00
5eb71608de Testing docker build 2016-02-29 11:34:01 +01:00
51398ca509 Fixed typo 2016-02-26 15:03:32 +01:00
16dc9c9da2 Removed unused layer 2016-02-26 15:00:46 +01:00
e30bf8d656 Added dynamic creation of map only if needed 2016-02-26 14:59:01 +01:00
3cd89b6870 Set factorio to 0.12.24 2016-02-26 11:30:02 +01:00
f33bfadd47 Initial commit 2016-02-26 11:09:47 +01:00
4 changed files with 312 additions and 2 deletions

28
Dockerfile Normal file
View 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.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"]

151
README.md
View File

@ -1,2 +1,149 @@
# docker_factorio_server # Supported tags and respective `Dockerfile` links
Factorio Server in Docker
* `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')
# What is Factorio?
[Factorio](https://www.factorio.com) is a game in which you build and maintain factories.
You will be mining resources, researching technologies, building infrastructure, automating production and fighting enemies. Use your imagination to design your factory, combine simple elements into ingenious structures, apply management skills to keep it working and finally protect it from the creatures who don't really like you.
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/).
# 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?
## Quick Start
This runs factorio with default settings, and your save will be kept:
```
docker run -d \
-v [PATH]:/opt/factorio/saves \
-p [PORT]:34197/udp \
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.
## Advanced usage
### Without map persistence
This will generate a new random map with default settings.
```
docker run -d \
-p [PORT]:34197/udp \
dtandersen/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.
```
docker run -d \
-v [PATH]:/opt/factorio/saves \
-p [PORT]:34197/udp \
dtandersen/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
```
docker run -d \
-v [PATH]:/opt/factorio/saves \
-p [PORT]:34197/udp \
dtandersen/factorio
```
### Autosave interval
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
```
Where [NUMBER] is the number of minutes between autosaves.
### Autosave slots
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.
```
docker run -d \
--env FACTORIO_AUTOSAVE_SLOTS=[NUMBER] \
-p [PORT]:34197/udp \
dtandersen/factorio
```
Where [NUMBER] is the number of autosave slots.
### Mounting mod volume
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
```
Where [PATH] is the path to the folder with your mods.
### Allowing in-game commands
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".
```
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
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".
```
docker run -d \
--env FACTORIO_NO_AUTO_PAUSE=true \
-p [PORT]:34197/udp \
dtandersen/factorio
```
### Logs
Sometimes it's useful to see the logs of a running container:
```
docker exec -it [CONTAINER] tail -f /opt/factorio/factorio-current.log
```
# Credits
Based on [Zopanix' Factorio Server](https://github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b9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
-----END CERTIFICATE-----

43
smart_launch.sh Executable file
View 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