Skip to content

Latest commit

 

History

History
119 lines (61 loc) · 1.69 KB

docker_install.md

File metadata and controls

119 lines (61 loc) · 1.69 KB

Install using Docker

Build the server binary files

First, build the docker image:

docker build -t darkeden:dev . -f Dockerfile.dev

Second, run the container

docker run -v `pwd`:/home/darkeden/vs/ -it darkeden:dev /bin/bash

On Windows pwd should be changed to %cd%

docker run -v %cd%/:/home/darkeden/vs/ -it darkeden:dev /bin/bash

Third, build the darkeden server binary files

make

and you can add -j 8 to the make command to accelerate the building process if you're using a 8-core machine.

When the build process finish, exit docker, and loginserver/sharedserver/gameserver are generated in the bin/ directory.

Run the binary (development mode)

TODO

Standalone version

NOTE: standalone version only support deploying server and client on the same machine.

If you want to run server on one machine, and client on the other, you need to modify mysql DARKEDEN.GameServerInfo table and restart server.

Pack the binary/config/data files into docker image

docker build . -t darkeden:latest -f Dockerfile.pub

Run using docker-compose

cd docker
docker-compose up -d

Login to server container:

docker exec -w /home/darkeden/vs/bin -it docker_odk-server_1  /bin/bash

Run the server:

./start.sh

Stop all:

./stop.sh
docker-compose down

Howto

Login to the MySQL

docker exec -it docker_odk-mysql_1 mysql -u elcastle -pelca110
use DARKEDEN;
update GameServerInfo set IP = '192.168.0.16';

Publish the docker image (memo for me)

docker tag c0bdad60a1a7(TAG) tiancaiamao/darkeden:latest
docker push tiancaiamao/darkeden:latest