A simple docker and docker-compose for running a PvPGN-PRO server in no time
Yet another pvpgn-docker project. Aims to be:
- โ time-proof, by pulling the latest code from PvPGN-PRO repo
- ๐ secure, by using non-privileged user and group to run the server
- ๐ small, by using alpine linux instead of ubuntu
- โ lightweight, by using multi-target building to keep only the needed content on the final image
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
First you need to copy over the configuration files and state structure. To do so on a bind volume (i.e. host directory) do:
mkdir {var,etc}
docker run --rm -v $PWD/var:/mnt/var wwmoraes/pvpgn-server cp -r /usr/local/pvpgn/var/pvpgn /mnt/var
docker run --rm -v $PWD/etc:/mnt/etc wwmoraes/pvpgn-server cp -r /usr/local/pvpgn/etc/pvpgn /mnt/etc
configure as needed by changing the files on $PWD/etc/pvpgn
and then run with
docker run -it -v $PWD/etc:/usr/local/pvpgn/etc -v $PWD/var:/usr/local/pvpgn/var -p 4000:4000 -p 6112:6112 wwmoraes/pvpgn-server
If you want to use a docker volume then use the create-var-volume.sh
and create-etc-volume.sh
scripts:
./scripts/create-var-volume.sh pvpgn-etc pvpgn-var
then run with
docker run -it -v pvpgn-etc:/usr/local/pvpgn/etc -v pvpgn-var:/usr/local/pvpgn/var -p 4000:4000 -p 6112:6112 wwmoraes/pvpgn-server
You'll need docker at least docker to run the base image, and docker-compose to run the full-blown server.
Pull the image from Docker Hub:
docker pull wwmoraes/pvpgn-server
Then/or just run:
docker run --rm -it wwmoraes/pvpgn-server:latest # or make run
The image exposes the ports 6112 (Battle.net server) and 4000 (game server). You should be able to connect your game through the host IP.
For detailed info about it read through the PvPGN-PRO docs: