Hello all, I have a pretty big interest in tech and get to tinkering sometimes. I have not been able to play much, seems people are active when I can't play unfortunately, so I decided to try and host an Assist25 server in a Docker container, purely for my own amusement. It was not super easy, but with limited knowledge of Docker I was able to set one up.
Disclaimer:
I have OMV(OpenMediaVault) set up running some containers for me. I have no idea how this will perform or if its viable, without players to test. I have also only ran through this once with OMV managing docker. You could theoretically do this with Portainer or manually, but I have not tried or tested.
The server is basic. I am also not aware of the current state of AA, doesn't seem like Punkbuster is used anymore, but some other mods took it's place? Either way, here is what I did.
First, the assist install script does not have a silent mode, that I could find, so I had to write an expect shell script to handle automated interaction. Easy enough. It looks like this:
#!/bin/expect
set timeout -1
spawn ./armyops250-linux.run
expect {
-- "--More--*" { send " "; exp_continue }
"Do you agree with the license*"
}
send "Y\r"
expect "Would you like to read the README.linux file*"
send "n\r"
expect "Please enter the installation path*"
send "/svr/armyops\r"
expect "Do you want to install*path*"
send "n\r"
expect "Do you want to install startup menu entries*"
send "n\r"
expect "Continue install*"
send "Y\r"
expect "Installation complete."
Next was the Dockerfile itself, I was able to get CentOS 7 working, so that is what I went with. The Dockerfile looks like this:
FROM centos:7
ENV DEBIAN_FRONTEND=noninteractive
#Use vault repos since centos 7 is not supported
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN yum -y update && yum -y install wget expect libgtk2 unzip gtk2.i686 && \
yum clean all
RUN mkdir -p /svr/armyops
WORKDIR /svr/armyops
RUN wget https://sourceforge.net/projects/distrobuild/files/sources/armyops250-linux.run/download -O armyops250-linux.run \
&& chmod +x armyops250-linux.run
COPY install_aa.expect /svr/armyops/
RUN chmod +x install_aa.expect && /svr/armyops/install_aa.expect
RUN test -f /svr/armyops/armyops && test -d /svr/armyops/System && echo "Install looks good"
RUN if [ ! -f /svr/armyops/System/serverx ]; then mv /svr/armyops/System/server-bin /svr/armyops/System/serverx && chmod +x /svr/armyops/System/serverx; else :; fi
RUN wget http://downloads.sourceforge.net/project/aa25assist/Binaries/ldedisrv.zip && unzip ldedisrv.zip -d /svr/armyops/System && chmod +x /svr/armyops/System/server-bin
EXPOSE 1716 1717 1718
CMD ["/svr/armyops/System/server-bin", "GLOBAL", "SFcsar"]
#CMD ["tail", "-f", "/dev/null"]
Next, I used docker-compose to spin up the container
That looked like this:
---
services:
server:
image: aa
container_name: aa-server
volumes:
- server_data:/svr/armyops
ports:
- 1716:1716/udp
- 1717:1717/udp
- 1718:1718/udp
networks:
- aa-svr
dns:
- 8.8.8.8
- 8.8.4.4
networks:
aa-svr:
driver: bridge
volumes:
server_data:
After starting the container, the downloader kept stopping in random spots downloading assets (hence DNS entries in docker-compose config), not sure if it was me, but stopping and starting would usually get me a little further. After the server tried to start the first time, it would crash, trying to start Entry.aao, it's like it didn't see my command, stopping it and starting it again fixed that.
After port-forwarding shenanigans, it was accessible. Apologies, this is a very crude guide, but I wanted to see if anyone else had any success with Docker.
Some key takeaways:
- Ensuring the container has persistent storage is paramount, this is done with a named volume. Otherwise everything is fresh every time the container is brought up.
- Using the tail -f command will allow you to enter the container for configuration if the server won't start, this can be overridden with docker-compose config as well
- I am not an expert in Docker, just someone with a little knowlege and the ability to search the internet.
You can find my server in the list.
Happy to try and answer any questions.