ElDewrito dedicated server dockerized
This is a Dockerfile for running the ElDewrito server under Linux. The container uses Wine to run the Windows application and xvfb to create a virtual desktop.
The container is running 100% headless - no GUI is required for installation, execution or configuration.
The game files are required in order to start this container. They are not bundled within the container and you will have to provide them.
See the docker-compose here (recommended) or manually start the container with the following command:
docker run -d -p 11774:11774/udp -p 11775:11775/tcp -p 11776:11776/tcp -p 11777:11777/tcp -v /path/to/game:/game -v /path/to/config:/config -v /path/to/logs:/logs --cap-add=SYS_PTRACE domistyle/eldewrito
The capability SYS_PTRACE is required due to how ElDewrito works. The server won't start without it.
A default configuration file and veto/voting rules will be created automatically if no configuration exists in the game directory. If you do not want to use this configuration you can override this behavior by creating your own dewrito_prefs.cfg before starting the container.
The following tags are available:
||Direct build from master branch. Generally not recommended.|
||Tagged builds taken from master branch. Used for testing.|
||Stable tags. Everything was tested and is working. (not available yet)|
Tutorial (for Ubuntu hosts)
- Prepare a Ubuntu host
- Install Docker for Ubuntu by following this guide
- Make sure Docker is working by running
- Install docker-compose with
sudo apt-get install docker-compose
- Grab the latest compose file from the git repository here
- Put the docker-compose.yml in a folder called eldewrito
- Switch into the folder and open the file with
- Adjust the image you want to use if necessary, e.g. change domistyle/eldewrito to domistyle/eldewrito:0.6-test5
- Put your Eldewrito game files into the folder you specified for /game
- Remove the dewrito_prefs.cfg from your game folder to let the container generate a known working one for you
docker-compose up -d
You're done. Your container will now be running and you can check if it is working by visting http://server_ip:11775 in your browser.
You can use
docker ps to view running containers.
To update the container either change the image tag inside of your docker-compose.yml and run
docker-compose up -d or use
docker-compose pull followed by
docker-compose up -d if you are using the latest tag.
You can use
docker-compose logs to view the logs inside of the container.
||UDP||Used for the game traffic|
||TCP||Runs the HTTP server used for communication with clients|
||TCP||Used for controlling the server via RCon|
||Has to be mounted with the ElDewrito game files in place.||Yes|
||Contains the veto.json and voting.json if the default configuration is used.||No|
||Contains the dorito.log and chat.log if the default configuration is used.||No|
||Set to true or 1 to run as user instead of root.||-||No|
||The user that the game server should be started as. You also need to set RUN_AS_USER.||1000||No|
||The group that should own the game, config and logs directories. You also need to set RUN_AS_USER.||1000||No|
||Starts the server in multi instance mode when set. Uses the configuration from /config/dewrito_prefs.cfg. Do not edit any config in your game directory in this mode, they will not be used. Instance identifier must be unique.||-||No|
||Set to true or 1 to disable the checksum check performed on container start. (not recommended)||-||No|
||Skips the chowning on container startup. Speeds up container startup but requires proper directory permissions.||-||No|
||Set to true or 1 to wait before the container exits.||-||No|
||Set to true or 1 to get verbose output from Wine.||-||No|
Issues & limitations
- The announce port(s) and listening port(s) can't be configured separately
- This means you can't take advantage of container/host ports in Docker yet
- Only 1:1 binding like 11774:11774 is possible for now
The server is running as root Not a security issue by itself, just bad practice and laziness
The dewrito_prefs.cfg can't be placed outside of the game directoryI'm working around this issue for now. Take a look at INSTANCE_ID for more details.
- The banlist.txt can't be placed outside of the game directory
- The server.json can't be placed outside of the game directory
The DedicatedServer.log can't be placed outside of the game directory