Dockerfile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # syntax=docker/dockerfile:1.7
  2. # ============================================================
  3. # Versions
  4. # ============================================================
  5. ARG SUNSHINE_VERSION=v2025.924.154138
  6. ARG NVIDIA_DRIVER_VERSION=580.126.20
  7. ARG NVIDIA_DRIVER_PACKAGE_VERSION=580.126.20-1ubuntu1
  8. # ============================================================
  9. # ============================================================
  10. # On récupère le paquet Sunshine depuis l'image officielle.
  11. FROM ghcr.io/lizardbyte/sunshine:${SUNSHINE_VERSION}-ubuntu-24.04 AS sunshine
  12. # PoC : on réutilise volontairement notre environnement graphique déjà validé.
  13. FROM image-registry.openshift-image-registry.svc:5000/desktop/desktop:latest
  14. USER root
  15. # L'image Sunshine officielle conserve le .deb utilisé pour installer Sunshine.
  16. COPY --from=sunshine /sunshine.deb /tmp/sunshine.deb
  17. RUN apt-get update \
  18. && apt-get install --no-install-recommends -y /tmp/sunshine.deb \
  19. && rm -f /tmp/sunshine.deb \
  20. && apt-get clean \
  21. && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
  22. COPY sunshine-entrypoint.sh /etc/sunshine-entrypoint.sh
  23. RUN sed -i 's/\r$//' /etc/sunshine-entrypoint.sh \
  24. && chmod 0755 /etc/sunshine-entrypoint.sh
  25. # Steam / Proton
  26. RUN dpkg --add-architecture i386 \
  27. && apt-get update \
  28. && apt-get install --no-install-recommends -y \
  29. ca-certificates \
  30. curl \
  31. && curl -fsSL \
  32. https://repo.steampowered.com/steam/archive/stable/steam.gpg \
  33. -o /usr/share/keyrings/steam.gpg \
  34. && printf '%s\n' \
  35. 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] https://repo.steampowered.com/steam/ stable steam' \
  36. > /etc/apt/sources.list.d/steam-bootstrap.list \
  37. && apt-get update \
  38. && apt-get install --no-install-recommends -y \
  39. steam-launcher \
  40. steam-libs-amd64 \
  41. steam-libs-i386 \
  42. libegl1:amd64 \
  43. libegl1:i386 \
  44. libgbm1:amd64 \
  45. libgbm1:i386 \
  46. libgl1:amd64 \
  47. libgl1:i386 \
  48. libgl1-mesa-dri:amd64 \
  49. libgl1-mesa-dri:i386 \
  50. libglx-mesa0:amd64 \
  51. libglx-mesa0:i386 \
  52. libvulkan1:amd64 \
  53. libvulkan1:i386 \
  54. && rm -f /etc/apt/sources.list.d/steam-bootstrap.list \
  55. && apt-get clean \
  56. && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
  57. # Stack 32bits Nvidia
  58. RUN curl -fsSLO \
  59. https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb \
  60. && dpkg -i cuda-keyring_1.1-1_all.deb \
  61. && rm -f cuda-keyring_1.1-1_all.deb \
  62. && dpkg --add-architecture i386 \
  63. && apt-get update \
  64. && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
  65. libnvidia-common-580=${NVIDIA_DRIVER_PACKAGE_VERSION} \
  66. libnvidia-gpucomp-580:i386=${NVIDIA_DRIVER_PACKAGE_VERSION} \
  67. libnvidia-decode-580:i386=${NVIDIA_DRIVER_PACKAGE_VERSION} \
  68. libnvidia-compute-580:i386=${NVIDIA_DRIVER_PACKAGE_VERSION} \
  69. libnvidia-gl-580:i386=${NVIDIA_DRIVER_PACKAGE_VERSION} \
  70. && apt-get clean \
  71. && rm -rf /var/lib/apt/lists/*
  72. USER 1000:1000
  73. ENV DISPLAY=:20 \
  74. HOME=/home/ubuntu \
  75. USER=ubuntu \
  76. XDG_RUNTIME_DIR=/tmp/runtime-ubuntu \
  77. PIPEWIRE_RUNTIME_DIR=/tmp/runtime-ubuntu \
  78. PULSE_RUNTIME_PATH=/tmp/runtime-ubuntu/pulse \
  79. PULSE_SERVER=unix:/tmp/runtime-ubuntu/pulse/native \
  80. NVIDIA_VISIBLE_DEVICES=all \
  81. NVIDIA_DRIVER_CAPABILITIES=all
  82. WORKDIR /home/ubuntu
  83. EXPOSE 47984-47990/tcp
  84. EXPOSE 48010/tcp
  85. EXPOSE 47998-48000/udp
  86. ENTRYPOINT ["/etc/sunshine-entrypoint.sh"]