Files
csdm/Dockerfile

50 lines
1.4 KiB
Docker
Raw 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:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y \
curl \
ca-certificates \
lib32gcc-s1 \
lib32stdc++6 \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Создаем нужные директории
RUN mkdir -p /steamcmd /hlds
WORKDIR /steamcmd
# Скачиваем и распаковываем steamcmd
RUN curl -sSL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar -xz
# Скачиваем HLDS с нужной beta-версией
RUN ./steamcmd.sh +@sSteamCmdForcePlatformType linux \
+login anonymous \
+force_install_dir /hlds \
+app_set_config 90 mod cstrike \
+app_update 90 -beta steam_legacy validate \
+quit
# Удаляем ненужные steam-библиотеки, если вдруг попали
RUN rm -f /hlds/steamclient.so /hlds/libsteam_api.so /hlds/steam_api.so
# Копируем файлы ReHLDS (должен быть ./rehlds/bin/linux32/ внутри контекста билда)
COPY rehlds/bin/linux32/ /hlds/
# Делаем основной бинарник исполняемым
RUN chmod +x /hlds/hlds_linux
# Копируем start.sh (обязателен для запуска)
COPY start.sh /start.sh
RUN chmod +x /start.sh
# Указываем точку входа
ENTRYPOINT ["/start.sh"]
# Открываем нужные порты
EXPOSE 27015/udp
EXPOSE 27020/udp
SHELL ["/bin/bash", "-c"]