Files
csdm/Dockerfile

64 lines
2.2 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM ubuntu:22.04
RUN echo "=== Updating Ubuntu ===" && \
dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get install -y \
build-essential \
gcc-11 \
g++-11 \
g++-11-multilib \
libc6-dev:i386 \
libc6:i386 \
libstdc++6:i386 \
lib32stdc++6 \
zlib1g:i386 \
wget \
cmake \
git \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Устанавливаем SteamCMD и загружаем через него оригинальный HLDS + CS 1.6:
RUN echo "=== Installing SteamCMD & HLDS ===" && \
mkdir -p /opt/hlds /opt/steamcmd && cd /opt/steamcmd && \
wget http://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz && \
tar xvfz steamcmd_linux.tar.gz && \
./steamcmd.sh \
+@sSteamCmdForcePlatformType linux \
+force_install_dir /opt/hlds \
+login anonymous \
+app_set_config 90 mod cstrike \
+app_update 90 -beta steam_legacy validate \
+quit
# Устанавливаем ReHLDS и помещаем с заменой в HLDS
RUN echo "=== Installing ReHLDS ===" && \
cd /opt/ && \
git clone https://github.com/rehlds/ReHLDS.git && \
cd ReHLDS && \
chmod +x build.sh && \
./build.sh --compiler=gcc --jobs=$(nproc) -DDEBUG=OFF && \
mv ./build/rehlds/HLTV/Console/hltv /opt/hlds/hltv && \
mv ./build/rehlds/HLTV/Core/core.so /opt/hlds/core.so && \
mv ./build/rehlds/HLTV/DemoPlayer/demoplayer.so /opt/hlds/demoplayer.so && \
mv ./build/rehlds/HLTV/Director/director.so /opt/hlds/valve/dlls/director.so && \
mv ./build/rehlds/HLTV/Proxy/proxy.so /opt/hlds/proxy.so && \
mv ./build/rehlds/engine_i486.so /opt/hlds/engine_i486.so && \
mv ./build/rehlds/dedicated/hlds_linux /opt/hlds/hlds_linux && \
mv ./build/rehlds/filesystem/FileSystem_Stdio/filesystem_stdio.so /opt/hlds/filesystem_stdio.so && \
cd /opt/ && \
rm -rf ReHLDS && \
rm /opt/hlds/libstdc++.so.6 && \
rm /opt/hlds/libgcc_s.so.1
# Открываем порт и задаём команду запуска сервера
EXPOSE 27015/udp
WORKDIR /opt/hlds
CMD ["/opt/hlds/hlds_run", "-console", "-game", "cstrike", "+map", "de_dust2"]
#CMD ["sleep", "infinity"]