Skip to content

Commit 75e1398

Browse files
Merge pull request #440 from AlexanderCurl/master
Added official Docker images
2 parents 89c4cf6 + 9de1c36 commit 75e1398

File tree

2 files changed

+56
-2
lines changed

2 files changed

+56
-2
lines changed

README.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A compatible client modification can be found here: [CoD4x_Client_pub](https://g
2020
The CoD4x server can run on Windows and Linux.
2121
The CoD4x client update is only available for windows.
2222

23-
## Setting up a Call of Duty 4 server with Cod4x
23+
## Setting up a Call of Duty 4 server with CoD4X
2424
Download binaries: [Releases](https://github.com/callofduty4x/CoD4x_Server/releases)
2525

2626
You also require the base game to run a server. Copy every .iwd file in `cod4directory/main/` to `serverdirectory/main/`.
@@ -30,13 +30,50 @@ Now you can run the server with `./cod4x18_dedrun +map mp_killhouse`. If you are
3030

3131
You will need a token if you want your server to be listed on the [Cod4x Master List](https://cod4master.cod4x.ovh). You can generate a token [here](https://cod4master.cod4x.ovh/index.php?token_generator=true).
3232

33-
Once a token is generated add it to the sv_authtoken cvar in server.cfg or command-line parameters by using `sv_authtoken "mytokenhere`
33+
Once a token is generated add it to the sv_authtoken cvar in server.cfg or command-line parameters by using `sv_authtoken "mytokenhere"`
3434

3535
Hint: you probably want to run the server on a separate user. Please don't run the server (any server) as root. That would be a major security threat.
3636

3737
A more detailed server tutorial is available on [our wiki](https://github.com/callofduty4x/CoD4x_Server/wiki/Server-setup).
3838
[Also read about new banlists here](https://github.com/callofduty4x/CoD4x_Server/wiki/Banlists-in-version-15.9--and-other-changes)
3939

40+
## Setting up Call of Duty 4 Server with CoD4X in Docker
41+
42+
Official images are now availabe on [Docker Hub](https://hub.docker.com/r/alexandercurl/cod4x-server)
43+
44+
Setting up with `docker compose` example config, also can be found in the repository:
45+
```
46+
services:
47+
cod4x-server:
48+
container_name: cod4x-server
49+
hostname: cod4x-server
50+
image: alexandercurl/cod4x-server:latest
51+
ports:
52+
- "28960:28960/tcp"
53+
- "28960:28960/udp"
54+
# Volumes store your data between container upgrades
55+
volumes:
56+
- "./main:/home/user/cod4/main"
57+
- "./main_shared:/home/user/cod4/main_shared"
58+
- "./zone:/home/user/cod4/zone"
59+
- "./mods:/home/user/cod4/mods"
60+
- "./plugins:/home/user/cod4/plugins"
61+
- "./usermaps:/home/user/cod4/usermaps"
62+
restart: unless-stopped
63+
```
64+
65+
Running with `docker run`:
66+
```
67+
docker run -d --name cod4x-server --restart=unless-stopped \
68+
-p 28960:28960 -p 28960:28960/udp \
69+
-v ./main:/home/user/cod4/main \
70+
-v ./zone:/home/user/cod4/zone \
71+
-v ./mods:/home/user/cod4/mods \
72+
-v ./plugins:/home/user/cod4/plugins \
73+
-v ./usermaps:/home/user/cod4/usermaps \
74+
alexandercurl/cod4x-server +exec server.cfg +map_rotate
75+
```
76+
4077
## Compiling on Linux
4178
To compile CoD4x from source, you need to install the following prerequisites:
4279

docker-compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
cod4x-server:
3+
container_name: cod4x-server
4+
hostname: cod4x-server
5+
image: alexandercurl/cod4x-server:latest
6+
ports:
7+
- "28960:28960/tcp"
8+
- "28960:28960/udp"
9+
# Volumes store your data between container upgrades
10+
volumes:
11+
- "./main:/home/user/cod4/main"
12+
- "./main_shared:/home/user/cod4/main_shared"
13+
- "./zone:/home/user/cod4/zone"
14+
- "./mods:/home/user/cod4/mods"
15+
- "./plugins:/home/user/cod4/plugins"
16+
- "./usermaps:/home/user/cod4/usermaps"
17+
restart: unless-stopped

0 commit comments

Comments
 (0)