Running Piqueserver with Docker¶
Image¶
You can either use the published image on Docker Hub or build it locally.
# using published image
docker pull piqueserver/piqueserver:master
# build it locally
git clone https://github.com/piqueserver/piqueserver
cd piqueserver
docker build -t piqueserver/piqueserver:master .
Running¶
Get your config ready. It should have the following structure:
config/
├── config.toml
├── game_modes
│ └── README.md
├── logs
├── maps
│ ├── classicgen.txt
│ └── random.txt
├── README.md
└── scripts
└── README.md
If you don’t have it you can grab it from the repository here. After setting up the config directory you can run piqueserver using the following command.
# running
docker run -d \
-rm \
-v /path/to/config:/config \
-p 32887:32887/udp -p 32886:32886/tcp \
--name mypiqueserver \
piqueserver/piqueserver:master
# viewing logs
docker logs mypiqueserver
# killing the server
docker kill mypiqueserver
Note
-v
flag only accepts absolute paths.Ports 32887 and 32886 are for the game and status server respectively.
-p
flag’s syntax is as follows host_port:container_port
If you want it to run on a different port change the host_port.