Skip to content

Commit adf707e

Browse files
committed
Migrate to LANCommander base image with hook-based install
Replace bash entrypoint with LANCommander PostInitialization hook (20-InstallServer.ps1) that downloads server binaries, extracts them, and patches the master server INI. Update Dockerfile to build from lancommander/base:latest with SERVER_URL/START_EXE/START_ARGS env vars. Update documentation to reflect new OverlayFS-based directory layout, security requirements, and hook extension points.
1 parent da8ac48 commit adf707e

File tree

5 files changed

+334
-435
lines changed

5 files changed

+334
-435
lines changed

Dockerfile

Lines changed: 20 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,38 @@
11
# syntax=docker/dockerfile:1.7
22

3-
FROM debian:bookworm-slim
3+
FROM lancommander/base:latest
44

5-
# Runtime directories (mount these as volumes)
6-
ENV CONFIG_DIR=/config
5+
ENV SERVER_URL="https://s3.amazonaws.com/ut2004-files/dedicated-server-3339-bonuspack.tar.gz"
76

8-
# Server settings
9-
ENV SERVER_PORT=7777
10-
ENV SERVER_ARGS=""
7+
ENV START_EXE="System/ucc-bin"
8+
ENV START_ARGS="-ini=SystemSettings.ini -ini=UT2004.ini -ini=UT2004Server.ini"
119

1210
# ----------------------------
1311
# Dependencies
1412
# ----------------------------
15-
# Enable multiarch for 32-bit libraries
16-
RUN dpkg --add-architecture i386 && \
17-
apt-get update && apt-get install -y --no-install-recommends \
13+
RUN apt-get update && apt-get install -y --no-install-recommends \
1814
ca-certificates \
1915
curl \
16+
bzip2 \
2017
tar \
21-
gzip \
22-
gosu \
18+
unzip \
19+
xz-utils \
20+
p7zip-full \
21+
gosu
22+
23+
RUN dpkg --add-architecture i386 && \
24+
apt-get update && apt-get install -y --no-install-recommends \
25+
libc6-i386 \
2326
lib32gcc-s1 \
2427
lib32stdc++6 \
25-
libc6-i386 \
28+
libstdc++5:i386 \
2629
&& rm -rf /var/lib/apt/lists/*
2730

28-
# Install libstdc++5 (32-bit) for UT2004 - download from Debian archive
29-
# Note: libstdc++5 is not available in bookworm, so we download from an older Debian release
30-
RUN set -eux; \
31-
apt-get update; \
32-
libstdc5_url="https://archive.debian.org/debian/pool/main/g/gcc-3.3/libstdc++5_3.3.6-20_i386.deb"; \
33-
curl -fsSL "${libstdc5_url}" -o /tmp/libstdc++5.deb; \
34-
dpkg -i /tmp/libstdc++5.deb || apt-get -f install -y --no-install-recommends; \
35-
rm -f /tmp/libstdc++5.deb; \
36-
rm -rf /var/lib/apt/lists/*; \
37-
# Verify the library is installed
38-
ls -la /usr/lib/i386-linux-gnu/libstdc++.so.5* || ls -la /usr/lib32/libstdc++.so.5* || true
39-
40-
# ----------------------------
41-
# Create a non-root user
42-
# ----------------------------
43-
RUN useradd -m -u 10001 -s /usr/sbin/nologin ut2004 \
44-
&& mkdir -p "${CONFIG_DIR}" \
45-
&& chown -R ut2004:ut2004 "${CONFIG_DIR}"
46-
47-
# ----------------------------
48-
# Entrypoint
49-
# ----------------------------
50-
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
51-
RUN chmod +x /usr/local/bin/entrypoint.sh
52-
53-
VOLUME ["/config"]
31+
EXPOSE 7777/udp
32+
EXPOSE 7778/udp
5433

55-
EXPOSE 7777/udp 7778/udp 7779/udp
34+
# COPY Modules/ "${BASE_MODULES}/"
35+
COPY Hooks/ "${BASE_HOOKS}/"
5636

5737
WORKDIR /config
58-
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
38+
ENTRYPOINT ["/usr/local/bin/entrypoint.ps1"]

0 commit comments

Comments
 (0)