Files
game-server/Dockerfile
bilal 95d7b24c73 Initial Docker-based game server setup for Sunshine and Steam.
Configure multi-player containers with GPU pinning, Moonlight-ready ports, and baseline project documentation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 15:14:58 +03:00

44 lines
2.0 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:22.04
# Отключаем интерактивные вопросы во время установки
ENV DEBIAN_FRONTEND=noninteractive
# 1. Добавляем 32-битную архитектуру для Steam и базовые графические зависимости
RUN dpkg --add-architecture i386 && \
apt-get update && apt-get install -y \
xvfb fluxbox dbus-x11 xauth xfonts-base x11-xserver-utils \
software-properties-common wget curl ca-certificates \
libcap2-bin libgomp1 mesa-utils \
libxcb-cursor0 libxcb-xinerama0 libxcb-xfixes0 libxcb-shape0 libxcb-randr0 libxcb-xtest0 \
libxcb-x11-0 libxcb-render0 libxcb-render-util0 libxcb-util1 libxcb-keysyms1 \
&& add-apt-repository multiverse \
&& apt-get update
# 2. Скачиваем оригинальный рабочий пакет Sunshine по вашей ссылке
# ВНИМАНИЕ: Замените маркер ниже на вашу ссылку из браузера, сохранив кавычки!
RUN wget "https://github.com/LizardByte/Sunshine/releases/download/v0.21.0/sunshine-ubuntu-22.04-amd64.deb" -O /tmp/sunshine.deb \
&& chmod +x /tmp/sunshine.deb
# 3. Устанавливаем скачанный пакет и Steam со всеми зависимостями
RUN apt-get update && \
echo "debconf steam/question select I AGREE" | debconf-set-selections \
&& apt-get install -y /tmp/sunshine.deb steam:i386 steam-devices \
&& rm -f /tmp/sunshine.deb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# 4. Скрипт очищает сессию, поднимает виртуальный экран, fluxbox и запускает Sunshine
RUN echo '#!/bin/bash\n\
rm -f /tmp/.X99-lock /tmp/.X11-unix/X99\n\
Xvfb :99 -ac -screen 0 1920x1080x24 &\n\
export DISPLAY=:99\n\
export HOME=/root\n\
sleep 3\n\
fluxbox &\n\
sleep 2\n\
exec /usr/bin/sunshine' > /entrypoint.sh && chmod +x /entrypoint.sh \
&& chmod +x /entrypoint.sh
USER root
ENTRYPOINT ["/entrypoint.sh"]