mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-07-01 14:38:05 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
d90f45bd41 | |||
2b201fea5b | |||
b0a64e5939 | |||
ef24dad0bf | |||
69a52f2c19 | |||
902ad53bd3 | |||
bd2af80a52 | |||
de9fb52d48 | |||
c0157e19ee |
@ -9,8 +9,8 @@ ARG PGID=845
|
|||||||
|
|
||||||
ENV PORT=34197 \
|
ENV PORT=34197 \
|
||||||
RCON_PORT=27015 \
|
RCON_PORT=27015 \
|
||||||
VERSION=0.17.2 \
|
VERSION=0.17.4 \
|
||||||
SHA1=0f0931e3444befcd5e37abe912551f75f681c4ca \
|
SHA1=30a7387e0450ecda8a48a9b56b18058c3f8a9f69 \
|
||||||
SAVES=/factorio/saves \
|
SAVES=/factorio/saves \
|
||||||
CONFIG=/factorio/config \
|
CONFIG=/factorio/config \
|
||||||
MODS=/factorio/mods \
|
MODS=/factorio/mods \
|
||||||
@ -18,7 +18,7 @@ ENV PORT=34197 \
|
|||||||
SCRIPTOUTPUT=/factorio/script-output
|
SCRIPTOUTPUT=/factorio/script-output
|
||||||
|
|
||||||
RUN mkdir -p /opt /factorio && \
|
RUN mkdir -p /opt /factorio && \
|
||||||
apk add --update --no-cache pwgen su-exec && \
|
apk add --update --no-cache pwgen su-exec binutils && \
|
||||||
apk add --update --no-cache --virtual .build-deps curl && \
|
apk add --update --no-cache --virtual .build-deps curl && \
|
||||||
curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
|
curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
|
||||||
-o /tmp/factorio_headless_x64_$VERSION.tar.xz && \
|
-o /tmp/factorio_headless_x64_$VERSION.tar.xz && \
|
||||||
@ -34,10 +34,6 @@ RUN mkdir -p /opt /factorio && \
|
|||||||
addgroup -g $PGID -S $GROUP && \
|
addgroup -g $PGID -S $GROUP && \
|
||||||
adduser -u $PUID -G $GROUP -s /bin/sh -SDH $USER && \
|
adduser -u $PUID -G $GROUP -s /bin/sh -SDH $USER && \
|
||||||
chown -R $USER:$GROUP /opt/factorio /factorio
|
chown -R $USER:$GROUP /opt/factorio /factorio
|
||||||
# mkdir -p /opt/factorio/temp && \
|
|
||||||
# chmod 777 -R /opt/factorio/temp && \
|
|
||||||
# mkdir -p /opt/factorio/temp && \
|
|
||||||
# chmod 777 -R /opt/factorio/temp && \
|
|
||||||
|
|
||||||
VOLUME /factorio
|
VOLUME /factorio
|
||||||
|
|
||||||
|
22
README.md
22
README.md
@ -1,6 +1,6 @@
|
|||||||
# Factorio [](https://microbadger.com/images/dtandersen/factorio "Get your own image badge on microbadger.com") [](https://hub.docker.com/r/dtandersen/factorio/) [](https://hub.docker.com/r/dtandersen/factorio/)
|
# Factorio [](https://microbadger.com/images/dtandersen/factorio "Get your own image badge on microbadger.com") [](https://hub.docker.com/r/dtandersen/factorio/) [](https://hub.docker.com/r/dtandersen/factorio/)
|
||||||
|
|
||||||
* `0.17.2-1`, `0.17`, `latest` [(0.17/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.17/Dockerfile)
|
* `0.17.4`, `0.17`, `latest` [(0.17/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.17/Dockerfile)
|
||||||
* `0.16.51`, `0.16`, `stable` [(0.16/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.16/Dockerfile)
|
* `0.16.51`, `0.16`, `stable` [(0.16/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.16/Dockerfile)
|
||||||
* `0.15.40`, `0.15` [(0.15/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.15/Dockerfile)
|
* `0.15.40`, `0.15` [(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.14.23`, `0.14` [(0.14/Dockerfile)](https://github.com/dtandersen/docker_factorio_server/blob/master/0.14/Dockerfile)
|
||||||
@ -195,20 +195,22 @@ The philosophy is to [keep it simple](http://wiki.c2.com/?KeepItSimple).
|
|||||||
|
|
||||||
To keep things simple, the container uses a single volume mounted at `/factorio`. This volume stores configuration, mods, and saves.
|
To keep things simple, the container uses a single volume mounted at `/factorio`. This volume stores configuration, mods, and saves.
|
||||||
|
|
||||||
|
The files in this volume should be owned by the factorio user, uid 845.
|
||||||
|
|
||||||
factorio
|
factorio
|
||||||
|-- config
|
|-- config
|
||||||
| |-- map-gen-settings.json
|
| |-- map-gen-settings.json
|
||||||
|
| |-- map-settings.json
|
||||||
| |-- rconpw
|
| |-- rconpw
|
||||||
| |-- server-settings.json
|
| |-- server-adminlist.json
|
||||||
| |-- server-whitelist.json
|
|
||||||
| |-- server-banlist.json
|
| |-- server-banlist.json
|
||||||
| `-- server-adminlist.json
|
| |-- server-settings.json
|
||||||
|
| `-- server-whitelist.json
|
||||||
|-- mods
|
|-- mods
|
||||||
| `-- fancymod.zip
|
| `-- fancymod.zip
|
||||||
`-- saves
|
`-- saves
|
||||||
`-- _autosave1.zip
|
`-- _autosave1.zip
|
||||||
|
|
||||||
|
|
||||||
## Docker Compose
|
## Docker Compose
|
||||||
|
|
||||||
[Docker Compose](https://docs.docker.com/compose/install/) is an easy way to run Docker containers.
|
[Docker Compose](https://docs.docker.com/compose/install/) is an easy way to run Docker containers.
|
||||||
@ -280,17 +282,17 @@ sudo docker run -d \
|
|||||||
dtandersen/factorio
|
dtandersen/factorio
|
||||||
```
|
```
|
||||||
|
|
||||||
VirtualBox users must enable Bridged networking in order for the host to be assigned an internal network IP. Enable Bridged networking in Vagrant with:
|
## 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.
|
||||||
|
|
||||||
```
|
```
|
||||||
config.vm.network "public_network"
|
config.vm.network "public_network"
|
||||||
config.vm.network "forwarded_port", guest: 34197, host: 34197
|
config.vm.network "forwarded_port", guest: 34197, host: 34197
|
||||||
```
|
```
|
||||||
|
|
||||||
## Vagrant
|
|
||||||
|
|
||||||
Vagrant is a good way for those without a Linux machine to try Docker. Check out the [Factorio Vagrant Box](https://github.com/dtandersen/factorio-lan-vagrant).
|
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
**My server is listed in the server browser, but nobody can connect**
|
**My server is listed in the server browser, but nobody can connect**
|
||||||
|
Reference in New Issue
Block a user