| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- # syntax=docker/dockerfile:1.7
- # ============================================================
- # Versions
- # ============================================================
- ARG SUNSHINE_VERSION=v2025.924.154138
- ARG NVIDIA_DRIVER_VERSION=580.126.20
- ARG NVIDIA_DRIVER_PACKAGE_VERSION=580.126.20-1ubuntu1
- # ============================================================
- # ============================================================
- # On récupère le paquet Sunshine depuis l'image officielle.
- FROM ghcr.io/lizardbyte/sunshine:${SUNSHINE_VERSION}-ubuntu-24.04 AS sunshine
- # PoC : on réutilise volontairement notre environnement graphique déjà validé.
- FROM image-registry.openshift-image-registry.svc:5000/desktop/desktop:latest
- # Import global ARGs into this build stage
- ARG NVIDIA_DRIVER_VERSION
- ARG NVIDIA_DRIVER_PACKAGE_VERSION
- USER root
- # L'image Sunshine officielle conserve le .deb utilisé pour installer Sunshine.
- COPY --from=sunshine /sunshine.deb /tmp/sunshine.deb
- RUN apt-get update \
- && apt-get install --no-install-recommends -y /tmp/sunshine.deb \
- && rm -f /tmp/sunshine.deb \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
- COPY sunshine-entrypoint.sh /etc/sunshine-entrypoint.sh
- RUN sed -i 's/\r$//' /etc/sunshine-entrypoint.sh \
- && chmod 0755 /etc/sunshine-entrypoint.sh
- # Steam / Proton
- RUN dpkg --add-architecture i386 \
- && apt-get update \
- && apt-get install --no-install-recommends -y \
- ca-certificates \
- curl \
- && curl -fsSL \
- https://repo.steampowered.com/steam/archive/stable/steam.gpg \
- -o /usr/share/keyrings/steam.gpg \
- && printf '%s\n' \
- 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] https://repo.steampowered.com/steam/ stable steam' \
- > /etc/apt/sources.list.d/steam-bootstrap.list \
- && apt-get update \
- && apt-get install --no-install-recommends -y \
- steam-launcher \
- steam-libs-amd64 \
- steam-libs-i386 \
- libegl1:amd64 \
- libegl1:i386 \
- libgbm1:amd64 \
- libgbm1:i386 \
- libgl1:amd64 \
- libgl1:i386 \
- libgl1-mesa-dri:amd64 \
- libgl1-mesa-dri:i386 \
- libglx-mesa0:amd64 \
- libglx-mesa0:i386 \
- libvulkan1:amd64 \
- libvulkan1:i386 \
- && rm -f /etc/apt/sources.list.d/steam-bootstrap.list \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
- # Stack 32bits Nvidia
- RUN curl -fsSLO \
- https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb \
- && dpkg -i cuda-keyring_1.1-1_all.deb \
- && rm -f cuda-keyring_1.1-1_all.deb \
- && dpkg --add-architecture i386 \
- && apt-get update \
- && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
- libnvidia-common-580=${NVIDIA_DRIVER_PACKAGE_VERSION} \
- libnvidia-gpucomp-580:i386=${NVIDIA_DRIVER_PACKAGE_VERSION} \
- libnvidia-decode-580:i386=${NVIDIA_DRIVER_PACKAGE_VERSION} \
- libnvidia-compute-580:i386=${NVIDIA_DRIVER_PACKAGE_VERSION} \
- libnvidia-gl-580:i386=${NVIDIA_DRIVER_PACKAGE_VERSION} \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/*
- USER 1000:1000
- ENV DISPLAY=:20 \
- HOME=/home/ubuntu \
- USER=ubuntu \
- XDG_RUNTIME_DIR=/tmp/runtime-ubuntu \
- PIPEWIRE_RUNTIME_DIR=/tmp/runtime-ubuntu \
- PULSE_RUNTIME_PATH=/tmp/runtime-ubuntu/pulse \
- PULSE_SERVER=unix:/tmp/runtime-ubuntu/pulse/native \
- NVIDIA_VISIBLE_DEVICES=all \
- NVIDIA_DRIVER_CAPABILITIES=all
- WORKDIR /home/ubuntu
- EXPOSE 47984-47990/tcp
- EXPOSE 48010/tcp
- EXPOSE 47998-48000/udp
- ENTRYPOINT ["/etc/sunshine-entrypoint.sh"]
|