-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from startersclan/enhancement/bump-bf2stats-va…
…riants-to-bf2stats-2.3.7-and-bf2stats-2.4.5 Enhancement: Bump `bf2stats` variants to `bf2stats-2.3.7` and `bf2stats-2.4.5`
- Loading branch information
Showing
35 changed files
with
3,861 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
FROM ubuntu:16.04 as install | ||
ARG TARGETPLATFORM=linux/amd64 | ||
ARG BUILDPLATFORM=linux/amd64 | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
# Install network utilities which can be useful for debugging issues | ||
# Install unzip and zip for the sake of applying ESAI strategies in ./mods/*/levels/*/server.zip at './GameModes/[gpm_coop|gpm_cq|sp1|sp2|sp3]/[16|32|64]/AI/Strategies.ai' | ||
RUN export DEBIAN_FRONTEND=noninteractive; \ | ||
apt-get update; \ | ||
apt-get install --no-install-recommends -y \ | ||
ca-certificates \ | ||
curl \ | ||
conntrack dnsutils iproute2 netcat net-tools tcpdump \ | ||
unzip zip \ | ||
; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
# Install Battlefield 2 server | ||
WORKDIR /root | ||
RUN set -eux; \ | ||
curl -sSLO https://files.startersclan.com/ea/bf2/bf2-linuxded-1.5.3153.0-installer.tgz; \ | ||
sha256sum bf2-linuxded-1.5.3153.0-installer.tgz | grep "^4d849218c1725e7bd6a7e7f164e27b036248f8ded2e30340dd0722c1dfffbab6 "; \ | ||
tar -zxvf bf2-linuxded-1.5.3153.0-installer.tgz; \ | ||
sh bf2-linuxded-1.5.3153.0-installer.sh --target /install --noexec --info; \ | ||
sh bf2-linuxded-1.5.3153.0-installer.sh --target /install --noexec; \ | ||
rm -v bf2-linuxded-1.5.3153.0-installer.sh; \ | ||
rm -v bf2-linuxded-1.5.3153.0-installer.tgz; \ | ||
cd /install; \ | ||
mkdir -p /server; \ | ||
# Show the licenses without a pager | ||
cat /install/license.sh | sed 's/^more/cat/' > /install/license-fixed.sh; \ | ||
# Agree to licenses | ||
printf '\naccept\n\nyes\n/server\ny\n' | sh /install/license-fixed.sh; \ | ||
find /server; \ | ||
rm -rf /install; | ||
|
||
# Install bf2all64 mod | ||
WORKDIR /root | ||
RUN set -eux; \ | ||
curl -sSLO https://files.startersclan.com/ea/bf2/bf2all64_v1.0_setup.zip; \ | ||
sha256sum bf2all64_v1.0_setup.zip | grep '^4ee82d91043c4afbf1bed50787cbf98af124bd7e6c608cdb0f5115c7761024f1 '; \ | ||
unzip bf2all64_v1.0_setup.zip -d extract; \ | ||
rm -rf /server/bf2/mods/bf2all64; \ | ||
mv extract/bf2all64 /server/bf2/mods; \ | ||
rm -fv bf2all64_v1.0_setup.zip; | ||
|
||
# Install bf2stats 2.3.7 | ||
WORKDIR /root | ||
RUN set -eux; \ | ||
curl -sSLO https://github.com/startersclan/bf2stats/archive/refs/tags/2.3.7.zip; \ | ||
echo "89a0f56becd310c02cc7a8200c3a235bde7a7edf0b8b221c42aa60de02ae2d9a 2.3.7.zip" | sha256sum -c -; \ | ||
unzip 2.3.7.zip -d extract; \ | ||
rm -rf /server/bf2/python; \ | ||
mv extract/bf2stats-2.3.7/src/python /server/bf2/python; \ | ||
rm -fv 2.3.7.zip; | ||
|
||
# Install ESAI in all mods | ||
WORKDIR /root | ||
COPY ESAI-Standard-v4.2.zip ESAI-Standard-v4.2.zip | ||
COPY lowercase-helper /usr/local/bin/lowercase-helper | ||
RUN set -eux; \ | ||
sha256sum ESAI-Standard-v4.2.zip | grep '^ef4e5d0f1446b9a2ddb0b350f1334273681c0f64d9c38c506320db769b24499c '; \ | ||
# Lowercase all files in ESAI folder | ||
for i in $( ls /server/bf2/mods ); do \ | ||
unzip ESAI-Standard-v4.2.zip -d /server/bf2/mods/$i; \ | ||
lowercase-helper --dir "/server/bf2/mods/$i/ESAI"; \ | ||
done; \ | ||
# Lowercase ESAI mapfiles' content | ||
for i in $( find /server/bf2/mods/*/esai/mapfiles -type f ); do \ | ||
CONTENT=$( cat "$i" ); \ | ||
echo "$CONTENT" | tr '[:upper:]' '[:lower:]' > "$i"; \ | ||
done; | ||
|
||
# Install esai-helper and configs | ||
COPY esai-helper /usr/local/bin/esai-helper | ||
COPY esai-optimized-strategies-bf2.txt /esai-optimized-strategies-bf2.txt | ||
COPY esai-optimized-strategies-bf2all64.txt /esai-optimized-strategies-bf2all64.txt | ||
COPY esai-optimized-strategies-xpack.txt /esai-optimized-strategies-xpack.txt | ||
|
||
COPY healthcheck /healthcheck | ||
|
||
# EXPOSE 16567/udp | ||
# EXPOSE 29900/udp | ||
# HEALTHCHECK CMD /healthcheck | ||
WORKDIR /server/bf2 | ||
CMD [ "./start.sh", "+modPath", "mods/bf2all64" ] |
Binary file not shown.
Oops, something went wrong.