Here you get a Docker Image for the Game Call of Duty 4. You can host easily multiple gameserver instances with one gamedir!
- Well documented Game Configurations
- Multiple Versions (
1.7
,1.8x
) - Multiple Server with one install
- Download latest Serverfiles
- COD4x Support included
- Easy Mod Support
For a fast start simply
docker create \
--name cod4docker \
-p 28960:28960 \
-p 28960:28960/udp \
-v <your/path/to/game/>:/gameserver \
-v <your/path/to/game/>:/config \
-e COD_VERSION="1_7" \
-e COD_GAME="nomod" \
-e STARTUP="+set fs_homepath config/default +set fs_savepath config/default +set dedicated 2 +set net_ip 0.0.0.0 +set net_port "28960" +exec server.cfg +map_rotate" \
keinnerd/cod4docker:latest
Then Check the server.cfg
in the config/default
dir.
Env | Options | Description |
---|---|---|
COD_VERSION | Basic: 1_7 or 1_8 |
Choose your Game Version |
COD_GAME | nomod or mod |
nomod = Call of Duty 4 Vanilla / mod = Call of Duty 4 with Mod Options |
STARTUP | "+set fs_homepath config/default +set fs_savepath config/default +set dedicated 2 +set net_ip 0.0.0.0 +set net_port "28960" +exec server.cfg +map_rotate " |
Adjust your Start command (fs_basepath is hardcoded to /gameserver) |
Hint: if you use the mod
ENV you must adjust the Startup Comand and have to add +set fs_game mods/yourmod
If you want to host multiple servers, create a new container then create inside your config folder different dirs and change +set fs_homepath config/default
to config/server2
the next to config/server3
. Create Configs or copy the config from default
Server inside the dirs and spin up the container.
โโ /config
โโโ> server1 (e.g call of duty 4 ranked)
โโโโโโโ> ranked/server.cfg
โโโ> server2 (e.g call of duty 4 unranked)
โโโโโโโ> unranked/server.cfg
โโโ> server3 (e.g Modded Server)
โโโโโโโ> yourmod/server.cfg & yourmod/mod.cfg or mod.cfg
Open needed Ports in your firewall! Default Ports: 28960/tcp 28960/udp
If you want to play a Modification you need to upload your mod in the gamedir
and adjust some ENV's
- Change
COD_GAME
tomod
- Change
COD_VERSION
to your needed Version - Change
STARTUP
to+set fs_game mods/YOURMOD +set fs_homepath config/YOURMOD/ +set dedicated 2 +set net_ip 0.0.0.0 +set net_port "28960" +exec YOURMOD.cfg +map_rotate
- nothing today
Feel free to fork and make pull requests. This are my first attempts with creating docker images so please give me feedback.