bgauduch / call-of-duty-2-docker-server

Minimal & lightweight Call of duty 2 server docker image - include libcod library
https://hub.docker.com/r/bgauduch/cod2server
MIT License
71 stars 17 forks source link
call-of-duty-2 cod2 dedicated-server docker docker-image dockerfile game game-server hacktoberfest server

image build Docker Pulls

Call of Duty 2 server meets docker

Launch a minimal & lightweight containarized Call of Duty 2 multiplayer game server, including libcod.

πŸ“¦ Supported tags and respective Dockerfile links

This repository use a multi-build setup to provide images for all server binaries located in the /bin folder. All image tags can be found on the Docker Hub registry.

The following convention is applied:

Please report to the releases section for the changelogs. Any other image tag is not supported.

πŸ”§ What's inside

Full credits goes to them for their awesome work !

πŸ“ Requirements

πŸš€ Usage

Setup the server

  1. Clone or download this repository on your host machine;
  2. Copy required data from the main folder of your original game (install directory or retail DVD) to the server:
    1. Copy all the iw_XX.iwd from 00 to 15 to the cod2server/main folder;
    2. Copy all the localizations localized_english_iwXX.iwd to the cod2server/main (it might be another language).
  3. Edit the config file located in cod2server/main/server_mp.cfg to suits your needs:
    1. [MANDATORY] Set the RCON password to something strong and private!
    2. Tweak the rest as you see fit, don't forget to updated the placeholders (server name, admin, etc).
  4. [Optional] If you need Punkbuster:
    1. Activate it by changing sv_punkbuster from 0 to 1 in the command arguments of the docker-compose.yamlfile;
    2. Edit the cod2server/main/punkbuster.cfg configuration to suits your needs.
  5. [Optional] Edit the bgauduch/cod2server image tag in docker-compose.yaml to choose a different server version;
  6. Depending on your setup, you might have some port-forwarding and firewalling to do in order to make your server publicly available (see required open ports in the EXPOSE section of the Dockerfile).

Launch the server

From the project root:

docker-compose up -d

Server interactions

From the project root, you can:

πŸ’» Development guidelines

If you wish to contribute to and improve this project, you can do so by cloning it and then follow theses guidelines :

Start / restart the server locally

./scripts/dev-up.sh

Note that you will need the game files in the main folder, as specified in the "Requirements" section.

Show server logs

./scripts/dev-logs.sh

Execute server commands

Attach a shell to the running server process to run a command, see available commands in /doc/readme.md:

./scripts/dev-attach.sh
# Exemple commands
status
map_rotate
# Use the escape sequence to detach: `CTRL+P`, `CTRL+Q`

Run a shell in the server container

You can debug directly inside the server container (show file structure, tail logs, etc):

./scripts/dev-exec.sh

Cleanup

Remove everything once your tests are over:

./scripts/dev-down.sh

πŸ—‚οΈ Notes & resources

🚧 Roadmap

Project roadmap & issues can be tracked on the project page.

πŸ™ Contribution

Any contribution to this project is welcome ! Feel free to open an issue to ask for help or a new feature, and it will be discussed there.

If you wish to contribute to the code, start by reading the development guidelines and then feel free to open a pull-request.

πŸ“– License

This project is under the MIT License.