Fix tcmalloc crash and add 32-bit libraries

- Added libc6-i386, libncurses5:i386, libtinfo5:i386 for Source engine
- Disabled tcmalloc via LD_PRELOAD
- Added -norestart flag for Docker environment
This commit is contained in:
Vish
2026-01-19 06:55:40 +00:00
parent c5763ef577
commit ae6a8ffb64
2 changed files with 10 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
TZ="America/Los_Angeles" \ TZ="America/Los_Angeles" \
AUTO_UPDATE="true" AUTO_UPDATE="true"
# Install dependencies # Install dependencies including 32-bit libraries required by Source engine
RUN dpkg --add-architecture i386 && \ RUN dpkg --add-architecture i386 && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
@@ -39,6 +39,9 @@ RUN dpkg --add-architecture i386 && \
unzip \ unzip \
lib32gcc-s1 \ lib32gcc-s1 \
lib32stdc++6 \ lib32stdc++6 \
libc6-i386 \
libncurses5:i386 \
libtinfo5:i386 \
locales \ locales \
tzdata && \ tzdata && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \

View File

@@ -180,8 +180,12 @@ cleanup() {
trap cleanup SIGTERM SIGINT trap cleanup SIGTERM SIGINT
# Add -disableluarefresh to prevent lua refresh issues # Add -disableluarefresh to prevent lua refresh issues
# Add -norestart to prevent auto-restart loop issues in Docker
ARGS="$ARGS -disableluarefresh" ARGS="$ARGS -disableluarefresh"
# Disable tcmalloc which causes issues in Docker environments
# This is a known issue with Source engine games in containers
export LD_PRELOAD=""
export MALLOC_CHECK_=0
# Start the server (using exec to replace shell process) # Start the server (using exec to replace shell process)
exec ./srcds_run $ARGS exec ./srcds_run $ARGS -norestart