Compare commits

...

112 Commits

Author SHA1 Message Date
dff6b849f8 Merge pull request #98 from dtandersen/update-0.16.7
Updated to version 0.16.7
2017-12-21 11:49:45 -08:00
5c616483f6 update to 0.16.7 2017-12-21 19:03:29 +00:00
856066ccf1 Merge pull request #96 from dtandersen/update-0.16.6
Updated to version 0.16.6
2017-12-18 20:14:24 +01:00
ce039016e0 update to 0.16.6 2017-12-18 18:48:30 +00:00
6f20f17472 Merge pull request #95 from dtandersen/update-0.16.5
Updated to version 0.16.5
2017-12-17 15:39:05 -08:00
44a28d5c70 update to 0.16.5 2017-12-17 20:03:30 +00:00
f9b2d6bb9f Merge pull request #94 from dtandersen/update-0.16.4
Updated to version 0.16.4
2017-12-16 10:09:56 -08:00
bb06a73144 update to 0.16.4 2017-12-16 11:58:29 +00:00
3eed964b32 Merge pull request #93 from dtandersen/update-0.16.3
Updated to version 0.16.3
2017-12-16 03:42:23 +01:00
0eb64bc190 update to 0.16.3 2017-12-15 15:08:32 +00:00
9834ca2842 don't need to make all of /opt/factorio writeable 2017-12-14 15:16:25 +00:00
6b2307635e give up on scenario entry point 2017-12-14 07:13:45 -08:00
6f4f179276 no need to set user 2017-12-14 07:10:27 -08:00
ebd6da4b97 Merge pull request #92 from dtandersen/update-0.16.2
Updated to version 0.16.2
2017-12-14 06:47:36 -08:00
8ee7c360c5 update to 0.16.2 2017-12-14 12:18:31 +00:00
5f7f1f145c 0.16.1 2017-12-13 13:19:19 -08:00
6b58cb1909 0.16.1 2017-12-13 21:17:41 +00:00
d6d039d4a6 0.15.40 is stable 2017-12-13 10:59:16 -08:00
02d2c449d3 add 0.16 to readme 2017-12-13 10:53:22 -08:00
8091c3a9f9 0.16.0 2017-12-13 18:43:01 +00:00
cb5bc74e4b run as factorio user 2017-12-13 18:33:51 +00:00
1ce5c5db7e added 0.16 2017-12-13 08:54:30 -08:00
e2e7cc7798 remove chmod +x because file is already executable 2017-12-12 10:14:49 -08:00
487d345480 Merge pull request #89 from luliu/patch-1
Allowing non-root user to run factorio
2017-12-12 10:14:03 -08:00
7a276adb3c Allowing non-root user to run factorio
When starting the container with `docker run -d -u $(id -u factorio):$(id -g factorio) ...`, permission is denied upon trying to create `/opt/factorio/.lock` file.
This permission tweak will allow caller to pass desired user from host to container such that the permissions are retained correctly when games are saved to the mount.

Also, it just feels wrong to run factorio as root, container or not.  :)
2017-12-06 15:46:45 -05:00
7a5f3471d6 Merge pull request #86 from tsuckow/fix-permissions
Fix permissions in #85
2017-11-29 20:28:34 -08:00
eac273e2d6 Fix permissions in #85 2017-11-29 23:05:43 -05:00
768eaac7b2 Update README.md
0.15.37 is still stable
2017-11-29 14:44:06 -08:00
67a0420f06 Merge pull request #80 from schmic/master
Allow to define RCON port as well
2017-11-29 14:39:21 -08:00
b2248d1e8c Merge branch 'master' into master 2017-11-29 14:38:50 -08:00
60a124f22c Merge branch 'master' into master 2017-11-29 14:38:08 -08:00
76ee77b674 Merge pull request #84 from dtandersen/update-0.15.40
Updated to version 0.15.40
2017-11-29 14:33:46 -08:00
a6f0b66f9b update to 0.15.40 2017-11-29 21:48:31 +00:00
596eec12b6 Merge pull request #83 from dtandersen/update-0.15.39
Updated to version 0.15.39
2017-11-27 14:09:54 -08:00
e30e313a55 Merge branch 'master' into update-0.15.39 2017-11-27 14:09:28 -08:00
9528901b95 Merge pull request #81 from dtandersen/update-0.15.38
Updated to version 0.15.38
2017-11-27 14:07:22 -08:00
16c0f35c97 update to 0.15.39 2017-11-27 19:53:35 +00:00
623cd6ac87 update to 0.15.38 2017-11-24 12:23:33 +00:00
ca3a66ca2f Allow to define RCON port as well 2017-11-12 13:49:58 +01:00
bc74c61fc0 Merge pull request #77 from dtandersen/update-0.15.37
Updated to version 0.15.37
2017-10-17 08:31:30 -07:00
893124cf43 update to 0.15.37 2017-10-17 14:26:02 +00:00
92130e3b34 Merge pull request #76 from dtandersen/update-0.15.36
Updated to version 0.15.36
2017-10-10 09:43:46 -07:00
1194fde627 update to 0.15.36 2017-10-10 15:26:00 +00:00
6ae4c0d569 Merge pull request #74 from dtandersen/update-0.15.35
Updated to version 0.15.35
2017-09-30 15:54:39 +02:00
11d8626ccd update to 0.15.35 2017-09-28 13:35:50 +00:00
d1d5e405cb Update README.md 2017-08-23 12:11:54 -07:00
1c1e374346 Merge pull request #72 from dtandersen/update-0.15.34
Updated to version 0.15.34
2017-08-23 12:10:42 -07:00
046a632860 update to 0.15.34 2017-08-23 12:57:11 +00:00
d80ae622fd Update README.md 2017-08-09 10:52:10 -07:00
07786290c4 Merge pull request #69 from dtandersen/update-0.15.33
Updated to version 0.15.33
2017-08-09 10:07:41 -07:00
1e5f88ffd9 update to 0.15.33 2017-08-09 16:12:14 +00:00
672101f0f7 0.15.31 is still stable 2017-08-02 09:34:10 -07:00
7b9d0f514e Merge pull request #67 from dtandersen/update-0.15.32
Updated to version 0.15.32
2017-08-02 09:30:12 -07:00
7e40c62ff6 update to 0.15.32 2017-08-02 11:57:11 +00:00
37fbaa38cf 0.15.31 is stable 2017-07-26 16:37:13 -07:00
b52a39fe03 Merge pull request #65 from dtandersen/update-0.15.31
Updated to version 0.15.31
2017-07-25 12:11:07 -07:00
4528be2297 update to 0.15.31 2017-07-25 17:07:12 +00:00
36bb311baa Merge pull request #64 from dtandersen/update-0.15.30
Updated to version 0.15.30
2017-07-14 18:21:30 +01:00
78289a5930 update to 0.15.30 2017-07-14 16:27:19 +00:00
250d5e464d Merge pull request #63 from dtandersen/update-0.15.29
Updated to version 0.15.29
2017-07-13 21:11:42 +01:00
70e61be5b6 update to 0.15.29 2017-07-13 19:42:12 +00:00
e935200821 Merge pull request #62 from dtandersen/update-0.15.28
Updated to version 0.15.28
2017-07-06 10:32:07 -07:00
add31ebe53 update to 0.15.28 2017-07-06 16:42:10 +00:00
8e20e6696b Merge pull request #61 from dtandersen/update-0.15.27
Updated to version 0.15.27
2017-07-03 11:01:28 -07:00
126669ca7a update to 0.15.27 2017-07-03 17:17:11 +00:00
67aaa41cd8 Merge pull request #59 from dtandersen/update-0.15.26
Updated to version 0.15.26
2017-07-01 08:32:40 +02:00
a61f05709e update to 0.15.26 2017-06-30 19:42:11 +00:00
0b5c4e144a Merge pull request #58 from dtandersen/update-0.15.25
Updated to version 0.15.25
2017-06-29 10:42:35 -07:00
95c45b7a39 update to 0.15.25 2017-06-29 17:22:13 +00:00
5dbb82debe Merge pull request #57 from dtandersen/update-0.15.24
Updated to version 0.15.24
2017-06-29 09:59:41 -07:00
d85de90142 update to 0.15.24 2017-06-29 10:27:12 +00:00
216ab0a7d5 Merge pull request #54 from dtandersen/update-0.15.23
Updated to version 0.15.23
2017-06-22 10:45:04 -07:00
e9c698cbc8 update to 0.15.23 2017-06-22 16:47:12 +00:00
8d0eef4e2c Merge pull request #52 from dtandersen/update-0.15.22
Updated to version 0.15.22
2017-06-22 14:10:48 +02:00
110a598ca8 update to 0.15.22 2017-06-21 16:37:12 +00:00
2f0ce132f2 Merge pull request #50 from dtandersen/update-0.15.21
Updated to version 0.15.21
2017-06-15 09:14:28 -07:00
96eff95f47 update to 0.15.21 2017-06-15 10:27:11 +00:00
6c5282b855 Merge pull request #48 from dtandersen/update-0.15.20
Updated to version 0.15.20
2017-06-14 10:16:50 -07:00
d195fdcdfc update to 0.15.20 2017-06-14 16:07:12 +00:00
d9a5fac17c Merge pull request #43 from Entroper/map-settings
Add map-settings.json config file
2017-06-08 08:36:51 -07:00
4ec6f41635 Merge pull request #44 from dtandersen/update-0.15.19
Updated to version 0.15.19
2017-06-08 08:35:16 -07:00
eb0a7410eb update to 0.15.19 2017-06-08 11:52:11 +00:00
01aeb3b1aa Add map-settings.json to README 2017-06-06 14:22:31 -04:00
91f28e34a2 add map-settings.json config file 2017-06-06 13:20:10 -04:00
7f9f640eff Merge pull request #41 from dtandersen/update-0.15.18
Updated to version 0.15.18
2017-06-02 01:58:24 -07:00
2d99b36f7e update to 0.15.18 2017-06-02 08:47:04 +00:00
5e71044728 updated to alpine 3.6 2017-06-01 18:31:53 +00:00
52dd896f3c 0.15.17 2017-06-01 11:25:14 -07:00
3a5ce81d2e Merge pull request #38 from Mettwurscht/patch-2
Update to 0.15.17
2017-06-01 11:24:24 -07:00
ad707ee2ad Update to 0.15.17 2017-06-01 15:39:01 +02:00
61fd28bb36 0.15.16 2017-05-27 12:12:43 -07:00
892a684f98 Merge pull request #36 from Mettwurscht/patch-1
Update to 0.15.16
2017-05-27 12:11:06 -07:00
a0cedba383 Update to 0.15.16 2017-05-27 20:07:37 +02:00
893c1b6214 Merge pull request #35 from Dianoga/0.15.15
Update to 0.15.15
2017-05-26 13:20:22 -07:00
0d79b49393 Update README.md 2017-05-26 15:09:27 -05:00
9d3f88ed6b Update to 0.15.15 2017-05-26 15:08:42 -05:00
a0338cc7b3 0.15.14 2017-05-26 10:50:27 -07:00
ed1fe2ba82 Merge pull request #34 from psykzz/patch-2
Update to 0.15.14
2017-05-26 10:47:40 -07:00
46769a042d Update to 0.15.14 2017-05-26 17:39:24 +01:00
0a5893578f Merge pull request #31 from dtandersen/update-v0.15.13-experimental
Update to v0.15.13-experimental
2017-05-23 14:47:17 -04:00
59b35f3ac0 Updated to v0.15.13-experimental 2017-05-23 18:45:33 +00:00
8138589baf Merge pull request #29 from dtandersen/update-v0.15.12-experimental
Update to v0.15.12-experimental
2017-05-18 08:56:56 -07:00
2b1115c19a Merge pull request #26 from dtandersen/server-id
server-id / banlist / docker-compose
2017-05-18 08:55:49 -07:00
b6276d7b51 Updated to v0.15.12-experimental 2017-05-18 15:45:34 +00:00
82a15c8f34 removed shell scripts debugging server 2017-05-17 17:15:05 +00:00
0fbcfbf857 added docker-compose.yml 2017-05-17 17:14:01 +00:00
dc89065e68 save the server id 2017-05-17 17:12:33 +00:00
bd5a44dce5 Merge pull request #24 from bkuhl/update-v0.15.11-experimental
Update to v0.15.11-experimental
2017-05-16 12:15:18 -04:00
26584556a3 Merge pull request #23 from tsugliani/patch-5
Update to 0.15.11
2017-05-16 12:14:57 -04:00
3a70062289 Merge branch 'master' into update-v0.15.11-experimental 2017-05-16 11:12:16 -04:00
c3fe70f783 Updated to v0.15.11-experimental 2017-05-16 15:10:55 +00:00
7a5732bbcd Update to 0.15.11 2017-05-16 15:56:00 +02:00
11 changed files with 122 additions and 22 deletions

View File

@ -1,10 +1,11 @@
FROM frolvlad/alpine-glibc:alpine-3.5
FROM frolvlad/alpine-glibc:alpine-3.6
MAINTAINER https://github.com/dtandersen/docker_factorio_server
ENV PORT=34197 \
VERSION=0.15.10 \
SHA1=2e11b3a9dd2e2a0a5831032325615c37a65ed414
RCON_PORT=27015 \
VERSION=0.15.40 \
SHA1=f79a975f6b8c0ee87e2fa60f7d1f7133f332c3ec
RUN mkdir /opt && \
apk add --update --no-cache tini pwgen && \
@ -13,6 +14,7 @@ RUN mkdir /opt && \
-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 && \
@ -20,7 +22,7 @@ RUN mkdir /opt && \
VOLUME /factorio
EXPOSE $PORT/udp 27015/tcp
EXPOSE $PORT/udp $RCON_PORT/tcp
COPY ./docker-entrypoint.sh /

View File

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

View File

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

8
0.15/docker-compose.yml Normal file
View File

@ -0,0 +1,8 @@
version: '2'
services:
factorio:
build: .
ports:
- "34197:34197"
volumes:
- /tmp/factorio:/factorio

View File

@ -21,10 +21,15 @@ 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-gen-settings $CONFIG/map-gen-settings.json \
--map-settings $CONFIG/map-settings.json
fi
exec /opt/factorio/bin/x64/factorio \
@ -32,5 +37,7 @@ exec /opt/factorio/bin/x64/factorio \
--start-server-load-latest \
--server-settings $CONFIG/server-settings.json \
--server-whitelist $CONFIG/server-whitelist.json \
--rcon-port 27015 \
--rcon-password "$(cat $CONFIG/rconpw)"
--server-banlist $CONFIG/server-banlist.json \
--rcon-port $RCON_PORT \
--rcon-password "$(cat $CONFIG/rconpw)" \
--server-id /factorio/config/server-id.json

View File

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

View File

@ -1,5 +0,0 @@
sudo docker run -d -p 34197:34197/udp -p 27015:27015/tcp \
-v factorio:/factorio \
--name factorio \
--restart=always \
factorio

39
0.16/Dockerfile Normal file
View File

@ -0,0 +1,39 @@
FROM frolvlad/alpine-glibc:alpine-3.6
MAINTAINER https://github.com/dtandersen/docker_factorio_server
ARG USER=factorio
ARG GROUP=factorio
ARG PUID=845
ARG PGID=845
ENV PORT=34197 \
RCON_PORT=27015 \
VERSION=0.16.7 \
SHA1=7bd14a4d8abe2feef015d1b3d75c6ec82a5e2ccf
VOLUME /factorio
RUN mkdir -p /opt && \
apk add --update --no-cache 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 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 && \
addgroup -g $PGID -S $GROUP && \
adduser -u $PUID -G $USER -s /bin/sh -SDH $GROUP && \
chown -R $USER:$GROUP /opt/factorio /factorio
EXPOSE $PORT/udp $RCON_PORT/tcp
COPY ./docker-entrypoint.sh /
USER $USER
ENTRYPOINT ["/docker-entrypoint.sh"]

8
0.16/docker-compose.yml Normal file
View File

@ -0,0 +1,8 @@
version: '2'
services:
factorio:
build: .
ports:
- "34197:34197"
volumes:
- /opt/factorio:/factorio

47
0.16/docker-entrypoint.sh Executable file
View File

@ -0,0 +1,47 @@
#!/bin/sh -x
set -e
id
SAVES=/factorio/saves
CONFIG=/factorio/config
mkdir -p $SAVES
mkdir -p /factorio/mods
mkdir -p $CONFIG
#chown -R factorio /factorio
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 [ ! -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

View File

@ -1,7 +1,8 @@
# Factorio [![](https://images.microbadger.com/badges/image/dtandersen/factorio.svg)](https://microbadger.com/images/dtandersen/factorio "Get your own image badge on microbadger.com") [![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.15.10`, `0.15`, `latest` [(0.15/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.15/Dockerfile)
* `0.14.23`, `0.14`, `stable` [(0.14/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.14/Dockerfile)
* `0.16.7`, `0.16`, `latest` [(0.16/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.16/Dockerfile)
* `0.15.40`, `0.15`, `stable` [(0.15/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.15/Dockerfile)
* `0.14.23`, `0.14` [(0.14/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.14/Dockerfile)
* `0.13.20`, `0.13` [(0.13/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.13/Dockerfile)
*Tag descriptions*
@ -94,7 +95,7 @@ Now run the server as before. In about a minute the new version of Factorio shou
## Saves
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.
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 `/tmp/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.