Skip to content

Commit

Permalink
Feat: upgrade cod4x to 20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Aug 9, 2021
1 parent b16954e commit 2026c6f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,27 @@ RUN dpkg --add-architecture i386 && \
apt-get -qq update && \
apt-get -qq install -y nasm:i386 build-essential gcc-multilib g++-multilib paxctl wget
WORKDIR /cod4
ARG COD4X_VERSION=v19.3.0
ARG COD4X_VERSION=20.0
RUN wget -qO- https://github.com/callofduty4x/CoD4x_Server/archive/${COD4X_VERSION}.tar.gz | \
tar -xz --strip-components=1 && \
sed -i 's/LINUX_LFLAGS=/LINUX_LFLAGS=-static /' makefile && \
make

FROM --platform=${BUILDPLATFORM} alpine:${ALPINE_VERSION} AS downloader
WORKDIR /tmp
ARG COD4X_VERSION=19.3
ARG COD4X_VERSION=20.0
RUN apk add --update --no-cache -q --progress unzip && \
wget -qO cod4x_server-linux.zip https://cod4x.me/downloads/cod4x_server-linux_${COD4X_VERSION}.zip && \
unzip -q cod4x_server-linux.zip -d . && \
rm cod4x_server-linux.zip && \
apk del unzip && \
dirname="cod4x_server-linux_${COD4X_VERSION}" && \
mv \
cod4x-linux-server/main/xbase_00.iwd \
cod4x-linux-server/main/jcod4x_00.iwd \
cod4x-linux-server/zone/cod4x_patchv2.ff \
${dirname}/cod4x-linux-server/main/xbase_00.iwd \
${dirname}/cod4x-linux-server/main/jcod4x_00.iwd \
${dirname}/cod4x-linux-server/zone/cod4x_patchv2.ff \
./ && \
rm -r cod4x-linux-server
rm -r ${dirname}

FROM --platform=${BUILDPLATFORM} alpine:${ALPINE_VERSION} AS files
WORKDIR /tmp
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Call of duty 4 dedicated server in a 24MB Docker image
- COD4 running on version 1.7 have to [update to 1.8-19.0](#update-your-game)
- Original COD4 **main** and **zone** files required (from the client installation directory)

⚠️ Version v19.x and up requires to bind mount `zone` without read only `:ro`

## Features

- [Cod4x server features](https://github.com/callofduty4x/CoD4x_Server#the-most-prominent-features-are)
Expand Down
17 changes: 9 additions & 8 deletions steam.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,28 @@ RUN dpkg --add-architecture i386 && \
apt-get -qq update && \
apt-get -qq install -y nasm:i386 build-essential gcc-multilib g++-multilib paxctl wget
WORKDIR /cod4
ARG COD4X_VERSION=v19.3.0
ARG COD4X_VERSION=20.0
RUN wget -qO- https://github.com/callofduty4x/CoD4x_Server/archive/${COD4X_VERSION}.tar.gz | \
tar -xz --strip-components=1 && \
make

FROM --platform=${BUILDPLATFORM} alpine:${ALPINE_VERSION} AS downloader
WORKDIR /tmp
ARG COD4X_VERSION=19.3
ARG COD4X_VERSION=20.0
RUN apk add --update --no-cache -q --progress unzip && \
wget -qO cod4x_server-linux.zip https://cod4x.me/downloads/cod4x_server-linux_${COD4X_VERSION}.zip && \
unzip -q cod4x_server-linux.zip -d . && \
rm cod4x_server-linux.zip && \
apk del unzip && \
dirname="cod4x_server-linux_${COD4X_VERSION}" && \
mv \
cod4x-linux-server/main/xbase_00.iwd \
cod4x-linux-server/main/jcod4x_00.iwd \
cod4x-linux-server/zone/cod4x_patchv2.ff \
cod4x-linux-server/steam_api.so \
cod4x-linux-server/steamclient.so \
${dirname}/cod4x-linux-server/main/xbase_00.iwd \
${dirname}/cod4x-linux-server/main/jcod4x_00.iwd \
${dirname}/cod4x-linux-server/zone/cod4x_patchv2.ff \
${dirname}/cod4x-linux-server/steam_api.so \
${dirname}/cod4x-linux-server/steamclient.so \
./ && \
rm -r cod4x-linux-server
rm -r ${dirname}/

FROM --platform=${BUILDPLATFORM} alpine:${ALPINE_VERSION} AS files
WORKDIR /tmp
Expand Down

0 comments on commit 2026c6f

Please sign in to comment.