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
docker-games-1.0.0a1.tar.gz
(8.4 kB
view hashes)
Built Distribution
Close
Hashes for docker_games-1.0.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9fc9e1955801d2e0d59d6272d1a6b66fd1455a7ef19944665b1c1a376725a80 |
|
MD5 | ad7fae4d3b62df6b0584cbb43305629e |
|
BLAKE2b-256 | 9429a4442cbd27a999984dc4dfac07e60cb8914d49a5f575f671367e47ce84e1 |