Compare commits

...

84 Commits

Author SHA1 Message Date
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
a496ba060b Merge pull request #22 from bkuhl/update-v0.15.10-experimental
Update to v0.15.10-experimental
2017-05-10 11:28:52 -07:00
7e78a4236f Merge branch 'master' into update-v0.15.10-experimental 2017-05-10 13:52:48 -04:00
0c5ff73adb Updated to v0.15.10-experimental 2017-05-10 13:52:13 -04:00
9ad1889aeb 0.15.9 2017-05-06 23:59:30 -07:00
2a23a3fe91 0.15.9 2017-05-05 14:54:07 -07:00
cfcbb035a7 Merge pull request #20 from warmwaffles/master
Bump to version 0.15.9
2017-05-05 14:53:06 -07:00
10f8b0acb6 Bump to version 0.15.9 2017-05-05 16:13:09 -05:00
c7309c1e5c 0.15.8 2017-05-05 11:05:51 -07:00
c845acc09f 0.15 is still 0.15.6 2017-05-05 09:26:22 -07:00
8bfe8b0261 0.15.7 2017-05-05 06:58:19 -07:00
2c7cfc6c65 Merge pull request #18 from tsugliani/patch-3
Update to 0.15.7
2017-05-05 06:57:37 -07:00
1250578039 Update to 0.15.7 2017-05-05 15:54:30 +02:00
97165cfdde 0.15.6 2017-05-02 08:22:17 -07:00
c6f144aff4 Merge pull request #13 from tsugliani/patch-2
Update to 0.15.6
2017-05-02 08:21:52 -07:00
481246c449 Update to 0.15.6 2017-05-02 16:38:07 +02:00
97cdaa825a Merge branch 'master' of github.com:dtandersen/docker_factorio_server 2017-04-30 08:37:53 -07:00
b36c299358 Merge pull request #11 from tsugliani/patch-1
Update to 0.15.5
2017-04-30 08:37:38 -07:00
4e09965476 0.15.5 2017-04-30 08:37:28 -07:00
5340267672 Update to 0.15.5 2017-04-30 13:44:44 +02:00
061d0c6c37 Merge pull request #10 from pshendry/master
Update to 0.15.4
2017-04-29 14:46:33 -07:00
84af48c346 Update to 0.15.4 2017-04-29 14:19:36 -07:00
2ca5f1368c Merge pull request #7 from XanderXAJ/0.15.3
Update 0.15.x branch to 0.15.3
2017-04-27 13:28:42 -07:00
bc0ef1b51e Update 0.15.x branch to 0.15.3 2017-04-27 20:44:14 +01:00
b2fbd707f8 location of server-whitelist.json 2017-04-27 08:32:07 -07:00
a88071d1aa minor text changes 2017-04-26 13:09:29 -07:00
a1f590270b added whitelisting and contributors section to readme 2017-04-26 13:07:40 -07:00
b0b5775365 Merge pull request #6 from gnomus/patch-1
Add possibility to use a whitelist
2017-04-26 12:59:35 -07:00
c988684348 added fancy badge 2017-04-26 12:38:31 -07:00
75e98e0543 Update docker-entrypoint.sh 2017-04-26 21:37:54 +02:00
0bc55d51a8 minor text changes 2017-04-26 12:31:08 -07:00
c50665c37f doc update 2017-04-26 12:29:43 -07:00
81c9d50e7a Add possibility to use a whitelist 2017-04-26 13:29:47 +02:00
c3631942e8 a tidbit about the console 2017-04-25 15:26:32 -07:00
7 changed files with 71 additions and 26 deletions

View File

@ -1,10 +1,10 @@
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.2 \
SHA1=b1fd6f104d746784d86730595e2411a285dfff38
VERSION=0.15.28 \
SHA1=ad8e7dfc8f56389fa36ad381c25e814ddf84b515
RUN mkdir /opt && \
apk add --update --no-cache tini pwgen && \

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,15 +21,23 @@ 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 \
--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 27015 \
--rcon-password "$(cat $CONFIG/rconpw)"
--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,10 +1,10 @@
# 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/)
# 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.2`, `0.15`, `latest` [(0.15/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.15/Dockerfile)
* `0.15.28`, `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.13.20`, `0.13` [(0.13/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.13/Dockerfile)
*Tags*
*Tag descriptions*
* `latest` - highest version: may be experimental.
* `stable` - highest version declared stable.
@ -67,9 +67,34 @@ 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.
docker run -d -it \
--name factorio \
dtandersen/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:
docker stop factorio
docker rm factorio
docker pull dtandersen/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` 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.
@ -85,11 +110,20 @@ Copy mods into the mods folder and restart the server.
Set the RCON password in the `rconpw` file. A random password is generated if `rconpw` doesn't exist.
To change the password stop the server, modify `rconpw`, and restart the server.
To change the password, stop the server, modify `rconpw`, and restart the server.
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.
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.
## Whitelisting (0.15.3+)
Create file `config/server-whitelist.json` and add the whitelisted users.
[
"you",
"friend"
]
# Container Details
The philosophy is to [keep it simple](http://wiki.c2.com/?KeepItSimple).
@ -107,7 +141,8 @@ To keep things simple, the container uses a single volume mounted at `/factorio`
|-- config
| |-- map-gen-settings.json
| |-- rconpw
| `-- server-settings.json
| |-- server-settings.json
| `-- server-whitelist.json
|-- mods
| `-- fancymod.zip
`-- saves
@ -116,13 +151,13 @@ To keep things simple, the container uses a single volume mounted at `/factorio`
## Ports
* `34197/udp` - Factorio clients (required).
* `34197/udp` - Game server (required).
* `27015/tcp` - RCON (optional).
## Environment Variables
* `PORT` - Start the server on an alterate port, .e.g. `docker run -e "PORT=34198"`.
* `PORT` (0.15+) - Start the server on an alterate port, .e.g. `docker run -e "PORT=34198"`.
## Troubleshooting
@ -140,9 +175,10 @@ To fix the incorrect port, start the Docker service with the `--userland-proxy=f
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.
# Credits
# Contributors
Ideas borrowed from:
* [Zopanix](https://github.com/zopanix/docker_factorio_server)
* [Rfvgyhn](https://github.com/Rfvgyhn/docker-factorio)
* [dtandersen](https://github.com/dtandersen/docker_factorio_server) - Maintainer
* [Zopanix](https://github.com/zopanix/docker_factorio_server) - Originator
* [Rfvgyhn](https://github.com/Rfvgyhn/docker-factorio) - Randomly generate RCON password
* [gnomus](https://github.com/gnomus/docker_factorio_server) - White listing
* [jaredledvina](https://github.com/jaredledvina/docker_factorio_server) - Version update