Fix Steam login flicker with 2GB shm and stable launch scripts.
Use tini-backed entrypoint, two-phase Steam startup, and a window keeper so CEF UI and the fluxbox toolbar stay visible in Moonlight. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
31
Dockerfile
31
Dockerfile
@@ -13,7 +13,7 @@ RUN if [ -n "$APT_PROXY" ]; then \
|
||||
RUN dpkg --add-architecture i386 && \
|
||||
apt-get update && apt-get install -y \
|
||||
xserver-xorg-core xserver-xorg-video-dummy xserver-xorg-input-libinput \
|
||||
fluxbox dbus-x11 xauth xfonts-base x11-xserver-utils xinput \
|
||||
fluxbox dbus-x11 xauth xfonts-base x11-xserver-utils xinput xdotool tini \
|
||||
software-properties-common wget curl ca-certificates locales pciutils \
|
||||
libboost-chrono1.74.0 libboost-filesystem1.74.0 libboost-locale1.74.0 \
|
||||
libboost-program-options1.74.0 libboost-thread1.74.0 \
|
||||
@@ -23,8 +23,7 @@ RUN dpkg --add-architecture i386 && \
|
||||
&& add-apt-repository multiverse \
|
||||
&& apt-get update
|
||||
|
||||
# 2. Скачиваем оригинальный рабочий пакет Sunshine по вашей ссылке
|
||||
# ВНИМАНИЕ: Замените маркер ниже на вашу ссылку из браузера, сохранив кавычки!
|
||||
# 2. Скачиваем проверенный пакет Sunshine
|
||||
RUN wget "https://github.com/LizardByte/Sunshine/releases/download/v0.20.0/sunshine-ubuntu-22.04-amd64.deb" -O /tmp/sunshine.deb \
|
||||
&& chmod +x /tmp/sunshine.deb
|
||||
|
||||
@@ -84,26 +83,10 @@ EndSubSection\n\
|
||||
EndSection\n\
|
||||
' > /etc/X11/xorg-dummy.conf
|
||||
|
||||
# 5. Поднимаем Xorg dummy, fluxbox и Sunshine
|
||||
RUN echo '#!/bin/bash\n\
|
||||
set -e\n\
|
||||
rm -f /tmp/.X99-lock /tmp/.X11-unix/X99\n\
|
||||
id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam\n\
|
||||
mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam\n\
|
||||
ln -sfn /home/steam/.local/share/Steam /home/steam/.steam\n\
|
||||
chown -R steam:steam /home/steam /tmp/xdg-steam\n\
|
||||
mkdir -p /run/dbus\n\
|
||||
dbus-daemon --system --fork || true\n\
|
||||
Xorg :99 -config /etc/X11/xorg-dummy.conf -nolisten tcp -noreset +extension GLX +extension RANDR +extension RENDER &\n\
|
||||
export DISPLAY=:99\n\
|
||||
export HOME=/root\n\
|
||||
export LANG=en_US.UTF-8\n\
|
||||
export LC_ALL=en_US.UTF-8\n\
|
||||
sleep 3\n\
|
||||
fluxbox &\n\
|
||||
sleep 2\n\
|
||||
exec /usr/bin/sunshine' > /entrypoint.sh && chmod +x /entrypoint.sh \
|
||||
&& chmod +x /entrypoint.sh
|
||||
# 5. Entrypoint, fluxbox и tini
|
||||
COPY scripts/entrypoint.sh /entrypoint.sh
|
||||
COPY scripts/fluxbox /etc/game-server/fluxbox
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
USER root
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user