Comments (33)
What are the steam_api.so and steamclient.so files used for?
xbase_00.iwd is obsolete and can be removed: https://cod4x.me/index.php?/forums/topic/1013-xiceops_00iwd/&tab=comments#comment-5217
from cod4-docker.
It should work now with
docker pull qmcgaw/cod4:steam
And add the Docker tag :steam
to your config file.
Although, @Freekers did the master list even worked initially with the older Docker image?
That steam
Docker image uses the steam files downloaded but it's 300MB+ vs 21MB, so ideally if we find a way to make it work on Alpine that would be nice π
from cod4-docker.
docker pull qmcgaw/cod4:steam
It works thank you!
from cod4-docker.
Ok i think the issue is fixed.
Note that I added this morning a built in HTTP server listening on port 8000 for mods and usermaps (iwd and ff files only, the rest are blocked). Instructions are here. Feel free to open another issue if you need help setting it up with your reverse proxy / port forwarding.
from cod4-docker.
Nice, many thanks! I'll definitely add it to the readme. Although it would be nice to somehow make it work in bridge mode, but it may be impossible.
from cod4-docker.
I'm not sure. I tried several approaches and this was the only one that worked for me in order to get the server to show up on the Activision Masterlist.
from cod4-docker.
I still can't register to cod4x master server π’
Meanwhile, another (bad, with precompiled files) image I created works ..
Here my stack:
version: "3"
services:
cod4-server:
image: qmcgaw/cod4:latest
container_name: cod4x-server-standard
volumes:
- /opt/cod4x/server/main:/home/user/cod4/main
- /opt/cod4x/server/zone:/home/user/cod4/zone:ro
- /opt/cod4x/server/mods:/home/user/cod4/mods
- /opt/cod4x/server/usermaps:/home/user/cod4/usermaps:ro
- /opt/cod4x/logs/standard:/home/user/.callofduty4
network_mode: host
stdin_open: true
tty: true
ports:
- 28960:28960/udp
command:
[
"+set dedicated 2",
"+sv_authtoken mytoken",
"+set sv_punkbuster 0",
"+set rcon_password mypassword",
"+set sv_maxclients 24",
"+set ui_maxclients 32",
"+set net_ip mypublicipv4",
"+set net_port 28960",
"+exec server.cfg",
"+map_rotate",
]
restart: unless-stopped
from cod4-docker.
Your docker-compose looks fine to me, but you can remove the following lines:
stdin_open: true
tty: true
ports:
- 28960:28960/udp
Ports are not used in network_mode host.
Looking at the date of the image on Docker Hub, I suspect the image of @qdm12 has to be rebuild because it doesn't have the sv_authtoken variable incorporated yet, which is now enforced to be listed on the cod4x.me master. Judging from the announcement post on the cod4x.me forums, they incorporated that into their code just Γ‘fter the last build of the @qdm12 Docker image.
from cod4-docker.
I use -it
so I can attach to the process and launch commands
Correct me if I'm wrong but it should work with $@
passing any parameter from command
Line 72 in 60362e0
from cod4-docker.
I'm not sure how that relates to what I said above.
The COD4x version in qdm12's Docker image needs to be updated in order to support the new token requirement by COD4x for their masterserver. This is done by updating the version number in the Dockerfile and rebuilding the image:
Line 5 in 60362e0
For example, try the fork of skrtheboss, which uses an update COD4x version: https://github.com/skrtheboss/cod4-docker
from cod4-docker.
Oh sorry now I got it, @qdm12 is working on the new Dockerfile
from cod4-docker.
Hello all, sorry for not answering earlier. So I just created that issue in order to have releases, because the image is based on Alpine to keep a small size and so we need to build the binary from source.
I just made a v17.7.2
release with its corresponding Docker tag v17.7.2
(Alpine 3.11, cod4x v17.7.2 and shell entrypoint).
I will make another release using the latest commit available for now and name the Docker tag with the short commit. Both :latest
and this docker tag will point to the latest source code from the cod4x repository.
I'm still working on making that fancy entrypoint (udp proxy + http static file server + launch cod4x, eventually restart it etc.), but it's not done unfortunately (all in 6MB extra). I will comment here once I've setup more releases/docker tags for you to try.
from cod4-docker.
qmcgaw/cod4
and qmcgaw/cod4:v17.8
now use the commit corresponding to the version change to v17.8 for cod4xServer. Note that you might have to update your cod4 client. I'll dig into the masterlist issue in the coming days, but feel free to try with the newer image π
from cod4-docker.
Nice! I will try soon!
Here my working sketch FTP server (I had 15kb/s problem with HTTP)
ftpd_server: # https://github.com/stilliard/docker-pure-ftpd
image: stilliard/pure-ftpd
container_name: cod4-ftpd
ports:
- "21:21"
- "30000-30009:30000-30009"
volumes: # mount only mods and usermaps
- /opt/cod4x/server/mods:/home/username/mods:ro
- /opt/cod4x/server/usermaps:/home/username/usermaps:ro
- /opt/cod4x/passwd:/etc/pure-ftpd/passwd
environment:
PUBLICHOST: "localhost"
FTP_USER_HOME: /home/username
FTP_USER_NAME: cod4fdl
FTP_USER_PASS: cod4fdl
from cod4-docker.
I'll send my config for http, I use Caddy instead of apache and it works well on a single port. The 15KB/s must be the default fallback method transferring data over udp. Are you using your 80 (or 443) port for anything?
from cod4-docker.
I used HTTP
and HTTPS
with valid cert under traefik2 but no luck, maybe it could be a client bug idk. With FTP server my friends are able to download fast, for me was fast-dl just the mod and not maps lol. (with HTTP/s always slow).
Ps. Still won't register to master server, does it work for you?
from cod4-docker.
I meant that I use Caddy just to serve over http the files... to my other Caddy proxy (with https) haha. So it should work for you as Caddy > Traefik > clients instead of Apache > Traefik > clients. You could also bind mount and serve the files directly with Traefik though, and you would have to add a line in your cod4 server config file. I'll send you what I use.
I haven't had time to test the master list, I'll do it this weekend together with the newer entrypoint/supervising program.
from cod4-docker.
@TheTrigger Are you running it on a VPS? If so, type ip a
and tell me if your WAN IP is listed there.
from cod4-docker.
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 96:00:00:22:a5:b0 brd ff:ff:ff:ff:ff:ff
inet 116.203.122.91/32 brd 116.203.122.91 scope global eth0
My own docker-image is actually working (with port binding and bridge network), I tried bot your (freekers/docker-cod4x17a) and @qdm12 image, and wont register to master server for me. idk where I'm wrong
FROM ubuntu:18.04
EXPOSE 28960/udp
RUN mkdir -p /home/user/cod4
WORKDIR /home/user/cod4
RUN dpkg --add-architecture i386
RUN apt update && apt upgrade -y
RUN apt install -yq wget net-tools unzip libc6:i386 libstdc++6:i386
RUN mkdir -p main
RUN mkdir -p zone
RUN mkdir -p mods
RUN mkdir -p usermaps
COPY . .
RUN chmod +x cod4x18_dedrun
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/home/user/cod4/entrypoint.sh"]
VOLUME ["/home/user/cod4/main"]
VOLUME ["/home/user/cod4/zone"]
VOLUME ["/home/user/cod4/mods"]
VOLUME ["/home/user/cod4/usermaps"]
from cod4-docker.
The only thing I can think of is a firewall issue, but that doesn't make any sense since you stated your own image seems to be working fine, assuming you're deploying it on the same Docker host.... Sorry, I'm out of ideas for now...
from cod4-docker.
Ok there are several differences with my image and this Dockerfile
- alpine:3.11 vs ubuntu:18.04 (so musl vs glibc)
- static cod4x18_dedrun vs non statically built cod4x18_dedrun (depending on runtime/libstdc++.so.6)
- what does
COPY
copy? From the downloaded zip file? If so, my image might be missing some files from there! - What's the entrypoint.sh?
I will dig into it now/tomorrow, maybe after I finish that newer entrypoint though.
from cod4-docker.
COPY
:
- main/server.cfg
- main/xbase_00.iwd
- cod4x18_dedrun
- entrypoint.sh
- steam_api.so
- steamclient.so
Content of entrypoint.sh
#!/usr/bin/env bash
./cod4x18_dedrun +set dedicated 2+set sv_punkbuster 0+set rcon_password "password"+sv_authtoken token+set sv_maxclients 24+set ui_maxclients 32+set net_port "28960"+exec server.cfg+map_rotate
from cod4-docker.
xbase_00.iwd is obsolete and can be removed: https://cod4x.me/index.php?/forums/topic/1013-xiceops_00iwd/&tab=comments#comment-5217
Are you sure he doesn't indent xiceops_00.iwd
is deprecated?
Actually if you download the bin of server, main/xbase_00.iwd
is present, also steam_api.dll
and steamclient.dll
from cod4-docker.
Ah yes, I see. That seems more likely indeed. A bit confusing the way it's written down.
from cod4-docker.
I'll add the two steam library files (hopefully they work on Alpine's musl though, otherwise I'll switch to a debian slim I guess), but these seem to be the only files missing. Maybe xbase_00.iwd changed although its size is the same as before, I didn't check with a hash if it changed though. Otherwise there are:
runtime/libstdc++.so.6
which is for non statically built cod4x18_dedrun binariescod4x18_dedrun_dbg
is a debug run version of the standard binary program
from cod4-docker.
So the steam files are closed source, non statically built files as I discussed in this issue ages ago (sorry forgot!) so they won't work on Alpine. What I'll do is have a Debian version with Steam (although it will likely be like 10 times bigger), but at least you can test it out see if this masterlist works
from cod4-docker.
@qdm12 I honestly don't remember. I tried many different combinations/configurations, including my own Docker image... Sorry!
Regarding those steam .DLL files; aren't these only for Windows? Does Linux actually use them?
from cod4-docker.
Linux uses the same files but built for Linux using the .so
file extension. It seems they are needed for authenticating users and quite likely needed for connecting to the master list.
I am still a bit confused where these steam library files are from and if they would be a way to use them without the 300MB of C++ libraries. There may be a way to handpick libraries needed by them (check with docker exec cod4 ldd steam_api.so
for example) but I gave up π I'll ask on the cod4xserver repo, maybe they have better ideas.
from cod4-docker.
Linux uses the same files but built for Linux using the
.so
file extension. It seems they are needed for authenticating users and quite likely needed for connecting to the master list.I am still a bit confused where these steam library files are from and if they would be a way to use them without the 300MB of C++ libraries. There may be a way to handpick libraries needed by them (check with
docker exec cod4 ldd steam_api.so
for example) but I gave up π I'll ask on the cod4xserver repo, maybe they have better ideas.
Sorry, I got confused by this #8 (comment) of TheTrigger, where he is referring to .DLL files, which don't work on Linux, but I now see there's a Linux version available of those as well.
It looks like they are used for authentication indeed. Quote: 'This library is required for receiving screenshots, everything related to Steam and getting of players the playerid. It is required to auth players.' https://cod4x.me/index.php?/forums/topic/148-library-doing-playerauthentication-for-version-159/
BTW. Do you know how to find out which COD4x subversion is running?
from cod4-docker.
Yes indeed. Although I'm starting to wonder, I've seen an error message on the statically compiled program about invalid certificates for https access (and it cannot resolve hostnames), that might be a reason why the masterlist doesn't work. I'll reopen, maybe I can fix that so it works on the tinier image.
You can find the cod4x subversion running at the top of your logs if I'm not mistaken.
from cod4-docker.
Regarding the invalid certificates; try adding the 'ca-certificates' package.
from cod4-docker.
Yes I already tried, even placed ca/ca-bundle.crt next to the binary but it doesn't see it somehow. I think the statically compiled program is a bit messed up somehow, I'll try digging into it this week.
from cod4-docker.
Hey guys, just before closing this issue:
- I reworked the image now, it's now up to date at cod4x version
20.1
- I reduced the image size of the Debian image from 365MB to 125MB, therefore it will be the only image from now. Support and build for the Alpine based images are abandoned.
- Now
:latest
(and future releases) should work with all features, feel free to let me know if it doesn't for anything.
from cod4-docker.
Related Issues (19)
- Fix container to run on Windows
- Add Healthcheck HOT 1
- games_mp.log gets overwritten at every container (re)start HOT 5
- Update to cod4 v1.9 HOT 3
- Server crashes on startup 19.0 HOT 8
- Support for Heroku HOT 1
- Update to cod4 v2.0 HOT 1
- Frp
- Update to cod4x v21 HOT 2
- how to build with steam disabled? HOT 3
- IWD files in mod not getting picked up HOT 1
- Settings for port forwarding and server config
- game not loading. Maybe localization error? HOT 12
- Some error in the docker logs HOT 3
- Logging doesnt work HOT 11
- Sys_LoadLibrary error: steam_api.so HOT 6
- Permissions zone and usermaps folder HOT 1
- Security Alert
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cod4-docker.