Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Bump bf2stats 2.7 variants to 2.7.2 #110

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ jobs:

# This step generates the docker tags
- name: Prepare
id: prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1
id: prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2
run: |
set -e

Expand All @@ -629,7 +629,7 @@ jobs:
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="v1.5.3153.0-bf2all64-bf2stats-2.7.1"
VARIANT="v1.5.3153.0-bf2all64-bf2stats-2.7.2"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"

Expand All @@ -639,45 +639,45 @@ jobs:
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT

- name: v1.5.3153.0-bf2all64-bf2stats-2.7.1 - Build (PRs)
- name: v1.5.3153.0-bf2all64-bf2stats-2.7.2 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v3
with:
context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.1
context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2
platforms: linux/386,linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: v1.5.3153.0-bf2all64-bf2stats-2.7.1 - Build and push (master)
- name: v1.5.3153.0-bf2all64-bf2stats-2.7.2 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
with:
context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.1
context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2
platforms: linux/386,linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: v1.5.3153.0-bf2all64-bf2stats-2.7.1 - Build and push (release)
- name: v1.5.3153.0-bf2all64-bf2stats-2.7.2 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
with:
context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.1
context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2
platforms: linux/386,linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

Expand Down Expand Up @@ -1353,7 +1353,7 @@ jobs:

# This step generates the docker tags
- name: Prepare
id: prep-v1-5-3153-0-bf2stats-2-7-1
id: prep-v1-5-3153-0-bf2stats-2-7-2
run: |
set -e

Expand All @@ -1366,7 +1366,7 @@ jobs:
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="v1.5.3153.0-bf2stats-2.7.1"
VARIANT="v1.5.3153.0-bf2stats-2.7.2"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"

Expand All @@ -1376,45 +1376,45 @@ jobs:
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT

- name: v1.5.3153.0-bf2stats-2.7.1 - Build (PRs)
- name: v1.5.3153.0-bf2stats-2.7.2 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v3
with:
context: variants/v1.5.3153.0-bf2stats-2.7.1
context: variants/v1.5.3153.0-bf2stats-2.7.2
platforms: linux/386,linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: v1.5.3153.0-bf2stats-2.7.1 - Build and push (master)
- name: v1.5.3153.0-bf2stats-2.7.2 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
with:
context: variants/v1.5.3153.0-bf2stats-2.7.1
context: variants/v1.5.3153.0-bf2stats-2.7.2
platforms: linux/386,linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: v1.5.3153.0-bf2stats-2.7.1 - Build and push (release)
- name: v1.5.3153.0-bf2stats-2.7.2 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
with:
context: variants/v1.5.3153.0-bf2stats-2.7.1
context: variants/v1.5.3153.0-bf2stats-2.7.2
platforms: linux/386,linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ All images contain [`Battlefield 2 Server 1.50`](https://www.bf-games.net/downlo
| `:v1.5.3153.0-bf2all64-bf2stats-2.4.6` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.4.6 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-2.5.1` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.5.1 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-2.6.0` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.6.0 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-2.7.1` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.7.1 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-2.7.2` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-3.1.0` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-3.1.0 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-3.1.2` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-3.1.2 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-3.2.0` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-3.2.0 ) |
Expand All @@ -31,7 +31,7 @@ All images contain [`Battlefield 2 Server 1.50`](https://www.bf-games.net/downlo
| `:v1.5.3153.0-bf2stats-2.4.6` | [View](variants/v1.5.3153.0-bf2stats-2.4.6 ) |
| `:v1.5.3153.0-bf2stats-2.5.1` | [View](variants/v1.5.3153.0-bf2stats-2.5.1 ) |
| `:v1.5.3153.0-bf2stats-2.6.0` | [View](variants/v1.5.3153.0-bf2stats-2.6.0 ) |
| `:v1.5.3153.0-bf2stats-2.7.1` | [View](variants/v1.5.3153.0-bf2stats-2.7.1 ) |
| `:v1.5.3153.0-bf2stats-2.7.2` | [View](variants/v1.5.3153.0-bf2stats-2.7.2 ) |
| `:v1.5.3153.0-bf2stats-3.1.0` | [View](variants/v1.5.3153.0-bf2stats-3.1.0 ) |
| `:v1.5.3153.0-bf2stats-3.1.2` | [View](variants/v1.5.3153.0-bf2stats-3.1.2 ) |
| `:v1.5.3153.0-bf2stats-3.2.0` | [View](variants/v1.5.3153.0-bf2stats-3.2.0 ) |
Expand Down
12 changes: 6 additions & 6 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ To customize the server, edit `serversettings.con` and `maplist.con` accordingly

```sh
# Generate serversettings.con and customize
docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1 cat /server/bf2/mods/bf2/settings/serversettings.con > serversettings.con
docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2 cat /server/bf2/mods/bf2/settings/serversettings.con > serversettings.con
# Generate maplist.con (coop)
docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1 bash -c '(esai-helper -m bf2 get maplist; esai-helper -m xpack get maplist) | grep gpm_coop' > maplist.con
docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2 bash -c '(esai-helper -m bf2 get maplist; esai-helper -m xpack get maplist) | grep gpm_coop' > maplist.con
# Generate maplist.con (conquest)
docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1 bash -c '(esai-helper -m bf2 get maplist; esai-helper -m xpack get maplist) | grep gpm_cq' > maplist.con
docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2 bash -c '(esai-helper -m bf2 get maplist; esai-helper -m xpack get maplist) | grep gpm_cq' > maplist.con
# Generate BF2StatisticsConfig.py and customize
docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1 cat /server/bf2/python/bf2/BF2StatisticsConfig.py > BF2StatisticsConfig.py
docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2 cat /server/bf2/python/bf2/BF2StatisticsConfig.py > BF2StatisticsConfig.py
# BF2 server with BF2Statistics 2.x.x
docker run --rm -it -p 16567:16567/udp -p 29900:29900/udp \
-v "$(pwd)/serversettings.con:/server/bf2/mods/bf2/settings/serversettings.con:ro" \
Expand All @@ -74,7 +74,7 @@ docker run --rm -it -p 16567:16567/udp -p 29900:29900/udp \
--add-host bf2web.gamespy.com:192.168.1.100 \
--add-host gamestats.gamespy.com:192.168.1.100 \
--add-host eapusher.dice.se:192.168.1.100 \
startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1
startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2
```

See `docker-compose` examples:
Expand Down Expand Up @@ -308,7 +308,7 @@ docker run --rm -it -p 16567:16567/udp -p 29900:29900/udp \
--add-host bf2web.gamespy.com:192.168.1.100 \
--add-host gamestats.gamespy.com:192.168.1.100 \
--add-host eapusher.dice.se:192.168.1.100 \
startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1
startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2
```

See `docker-compose` examples:
Expand Down
7 changes: 4 additions & 3 deletions generate/definitions/VARIANTS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $local:VARIANTS_MATRIX = @(
@{ components = @( 'bf2all64', 'bf2stats-2.4.6' ) }
@{ components = @( 'bf2all64', 'bf2stats-2.5.1' ) }
@{ components = @( 'bf2all64', 'bf2stats-2.6.0' ) }
@{ components = @( 'bf2all64', 'bf2stats-2.7.1' ) }
@{ components = @( 'bf2all64', 'bf2stats-2.7.2' ) }
@{ components = @( 'bf2all64', 'bf2stats-3.1.0' ) }
@{ components = @( 'bf2all64', 'bf2stats-3.1.2' ) }
@{ components = @( 'bf2all64', 'bf2stats-3.2.0' ) }
Expand All @@ -23,7 +23,7 @@ $local:VARIANTS_MATRIX = @(
@{ components = @( 'bf2stats-2.4.6' ) }
@{ components = @( 'bf2stats-2.5.1' ) }
@{ components = @( 'bf2stats-2.6.0' ) }
@{ components = @( 'bf2stats-2.7.1' ) }
@{ components = @( 'bf2stats-2.7.2' ) }
@{ components = @( 'bf2stats-3.1.0' ) }
@{ components = @( 'bf2stats-3.1.2' ) }
@{ components = @( 'bf2stats-3.2.0' ) }
Expand Down Expand Up @@ -65,7 +65,7 @@ $VARIANTS = @(
@{
variables = @{
# Since bf2stats 2 python files
# E.g. https://github.com/startersclan/bf2stats/archive/refs/tags/2.7.1.tar.gz
# E.g. https://github.com/startersclan/bf2stats/archive/refs/tags/2.7.2.tar.gz
bf2stats_2_sha256sum = @"
29a25c6e78062f34b05d7086aad530b598b4c9ed3f32164ffcf3b1c52b33f553 2.3.0.tar.gz
9a5e0544ba1474feb5ca0194449f6d6dee521abf59cba96dbc94387490d660b0 2.3.1.tar.gz
Expand All @@ -88,6 +88,7 @@ e07f46f0078fc0dcdbeb0dd86e1e9add4b502b0d7b263711dcad957ec4a6de61 2.5.1.tar.gz
7a75b58fec1b1d105c1a495e543eff6f2ee0fd0bf4ab010078539ef95e55f6e7 2.6.0.tar.gz
daeb57232cd1725bea3cf45c197fba13d99251864347ffff44552aae585b273a 2.7.0.tar.gz
96a9cd2c1283668e417f45ee14dec6307cbad9f310a81e2e8b5af95a871fef4f 2.7.1.tar.gz
bee8933873b42fff26aff34de964d54f4f470e256be43de7ab30ad122788d605 2.7.2.tar.gz
"@
# Since bf2stats 3 python files
# E.g. https://github.com/startersclan/statspython/archive/refs/tags/3.2.0.tar.gz
Expand Down
101 changes: 101 additions & 0 deletions variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
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
COPY aibehaviours-fixlookatwrapper.ai /aibehaviours-fixlookatwrapper.ai
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; \
# Apply the LookAtWrapper fix to prevent crashes when playing with bots
mv -v /server/bf2/mods/bf2/ai/aibehaviours.ai /server/bf2/mods/bf2/ai/aibehaviours.ai.original; \
cp -v /aibehaviours-fixlookatwrapper.ai /server/bf2/mods/bf2/ai/aibehaviours.ai; \
mv -v /server/bf2/mods/xpack/ai/aibehaviours.ai /server/bf2/mods/xpack/ai/aibehaviours.ai.original; \
cp -v /aibehaviours-fixlookatwrapper.ai /server/bf2/mods/xpack/ai/aibehaviours.ai; \
rm -v /aibehaviours-fixlookatwrapper.ai

# Install bf2all64 mod
WORKDIR /root
COPY aibehaviours-fixlookatwrapper.ai /aibehaviours-fixlookatwrapper.ai
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; \
# Apply the LookAtWrapper fix to prevent crashes when playing with bots
mv -v /server/bf2/mods/bf2all64/ai/aibehaviours.ai /server/bf2/mods/bf2all64/ai/aibehaviours.ai.original; \
cp -v /aibehaviours-fixlookatwrapper.ai /server/bf2/mods/bf2all64/ai/aibehaviours.ai; \
rm -v /aibehaviours-fixlookatwrapper.ai

# Install bf2stats 2.7.2
WORKDIR /root
RUN set -eux; \
curl -sSLO https://github.com/startersclan/bf2stats/archive/refs/tags/2.7.2.tar.gz; \
echo "bee8933873b42fff26aff34de964d54f4f470e256be43de7ab30ad122788d605 2.7.2.tar.gz" | sha256sum -c -; \
mkdir -p extract; \
tar -C extract -zxvf 2.7.2.tar.gz; \
rm -rf /server/bf2/python; \
mv extract/bf2stats-2.7.2/src/python /server/bf2/python; \
rm -fv 2.7.2.tar.gz; \
rm -rf extract

# 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.
Loading