Easily create game servers using Docker and Python.
Project description
Docker Game Servers
Configuration
- Install Docker: you can find the instructions for installing Docker on the official website.
- Ensure you have Python 3.x on your system by running
python --version.
Running a Game Server
- Install this package
$ pip install docker-games
- Create your server's configuration in a new Python file
- Enjoy!
Minecraft
from docker_games import Minecraft
minecraft = Minecraft('creepers_go_boom', '2GB', '/home/stefano/mc_data')
minecraft.add_ports(25565, 25565)
minecraft.accept_license() # <-- accept Minecraft's EULA
minecraft.online_mode() # <-- server checks connecting players against Minecraft account database
minecraft.start()
Docker image: https://hub.docker.com/r/itzg/minecraft-server
Factorio
from docker_games import Factorio
factorio = Factorio('flying_robots', '/home/stefano/factorio_data')
factorio.add_ports(34197, '34197/udp')
factorio.add_ports(27015, '27015/tcp')
factorio.start()
Docker image: https://hub.docker.com/r/factoriotools/factorio
TeamSpeak
from docker_games import TeamSpeak
teamspeak = TeamSpeak('tsserver', '/tmp/ts_data')
teamspeak.add_ports(9987, '9987/udp')
teamspeak.add_ports(10011, 10011)
teamspeak.add_ports(30033, 30033)
teamspeak.accept_license() # <-- accept TeamSpeak's license
teamspeak.start()
Docker image: https://hub.docker.com/_/teamspeak
Contributing
Contributions are very welcome!
If you want to improve this project, or add more server, fork the repo and submit a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docker-games-1.0.0a5.tar.gz.
File metadata
- Download URL: docker-games-1.0.0a5.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.8.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b0563d12f2e64d433624a5ebbdc0a46ee672f6ac731f0aa4668c70cd36a7177
|
|
| MD5 |
89269e85fb9bfa78b51eaf1a64074337
|
|
| BLAKE2b-256 |
86514a5c57bd336e911489bb43760d30eebf369a39138c445e5fcb0115f6325e
|
File details
Details for the file docker_games-1.0.0a5-py3-none-any.whl.
File metadata
- Download URL: docker_games-1.0.0a5-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.8.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9908275764dce0cb1c7c3ea343837a6f8557510461e4347314bd4eb701b3a40
|
|
| MD5 |
d34272a1399edbf500a0944ee35fd93e
|
|
| BLAKE2b-256 |
88d8c722083040c6016265f17e0bd480c4066ad4e781f509c9c4a26f98b67de4
|