minor text changes

This commit is contained in:
David Andersen 2017-12-30 20:33:05 -08:00
parent 648b81edf8
commit 2474da335e

View File

@ -32,8 +32,11 @@ NOTE: This is only the server. The game is available at [factorio.com](https://w
Run the server to create the necessary folder structure and configuration files. For this example data is stored in `/opt/factorio`. Run the server to create the necessary folder structure and configuration files. For this example data is stored in `/opt/factorio`.
``` ```
chown 845:845 /tmp/factorio # 0.16+ only sudo mkdir -p /opt/factorio
docker run -d -p 34197:34197/udp -p 27015:27015/tcp \ sudo chown 845:845 /opt/factorio
sudo docker run -d \
-p 34197:34197/udp \
-p 27015:27015/tcp \
-v /opt/factorio:/factorio \ -v /opt/factorio:/factorio \
--name factorio \ --name factorio \
--restart=always \ --restart=always \
@ -48,7 +51,7 @@ For those new to Docker, here is an explanation of the options:
* `--restart` - Restart the server if it crashes and at system start * `--restart` - Restart the server if it crashes and at system start
* `--name` - Name the container "factorio" (otherwise it has a funny random name). * `--name` - Name the container "factorio" (otherwise it has a funny random name).
The `chown` command is needed because in 0.16+, we no longer run the game server as root for security reasons, but rather as a 'factorio' user with user id 845. The host must therefore allow these files to be written by that user. The `chown` command is needed because in 0.16+, we no longer run the game server as root for security reasons, but rather as a 'factorio' user with user id 845. The host must therefore allow these files to be written by that user.
Check the logs to see what happened: Check the logs to see what happened:
@ -153,6 +156,16 @@ To keep things simple, the container uses a single volume mounted at `/factorio`
`-- _autosave1.zip `-- _autosave1.zip
## Docker Compose
```
git clone https://github.com/dtandersen/docker_factorio_server.git
sudo mkdir -p /opt/factorio
sudo chown 845:845 /opt/factorio
cd docker_factorio_server/0.16
sudo docker-compose up -d
```
## Ports ## Ports
* `34197/udp` - Game server (required). * `34197/udp` - Game server (required).
@ -162,6 +175,7 @@ To keep things simple, the container uses a single volume mounted at `/factorio`
## Environment Variables ## Environment Variables
* `PORT` (0.15+) - 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"`.
* `RCON_PORT` (0.16+) - Start the RCON on an alterate port, .e.g. `docker run -e "RCON_PORT=34198"`.
## Troubleshooting ## Troubleshooting