First of all you need to run a gameserver.
see nuggeta/gameserver docker container
create a file named config.js to set public ip/port of the gameserver
so add this two variables :
- gsIp=127.0.0.1 / put your gameserver host public ip or hostname /
- gsPort=5010 / put your gameserver port (default 5010) /
on centos host you may need to run this to allow access to config.js within the container.
- chcon -Rt svirt_sandbox_file_t $(pwd)
run the nginx webserver hosting the game
- docker run -d --name sample-game -p 80:80 -v $(pwd)/config.js:/usr/share/nginx/html/js/config.js:ro nuggeta/sample-game-html