Dockerfile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # syntax=docker/dockerfile:1.7
  2. ARG SUNSHINE_VERSION=v2025.924.154138
  3. # On récupère le paquet Sunshine depuis l'image officielle.
  4. FROM ghcr.io/lizardbyte/sunshine:${SUNSHINE_VERSION}-ubuntu-24.04 AS sunshine
  5. # PoC : on réutilise volontairement notre environnement graphique déjà validé.
  6. FROM image-registry.openshift-image-registry.svc:5000/desktop/desktop:latest
  7. USER root
  8. # L'image Sunshine officielle conserve le .deb utilisé pour installer Sunshine.
  9. COPY --from=sunshine /sunshine.deb /tmp/sunshine.deb
  10. RUN apt-get update \
  11. && apt-get install --no-install-recommends -y /tmp/sunshine.deb \
  12. && rm -f /tmp/sunshine.deb \
  13. && apt-get clean \
  14. && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
  15. COPY sunshine-entrypoint.sh /etc/sunshine-entrypoint.sh
  16. RUN sed -i 's/\r$//' /etc/sunshine-entrypoint.sh \
  17. && chmod 0755 /etc/sunshine-entrypoint.sh
  18. # Steam / Proton
  19. RUN dpkg --add-architecture i386 \
  20. && apt-get update \
  21. && apt-get install --no-install-recommends -y \
  22. ca-certificates \
  23. curl \
  24. && curl -fsSL \
  25. https://repo.steampowered.com/steam/archive/stable/steam.gpg \
  26. -o /usr/share/keyrings/steam.gpg \
  27. && printf '%s\n' \
  28. 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] https://repo.steampowered.com/steam/ stable steam' \
  29. > /etc/apt/sources.list.d/steam-stable.list \
  30. && apt-get update \
  31. && apt-get install --no-install-recommends -y \
  32. libgl1:amd64 \
  33. libgl1:i386 \
  34. libgl1-mesa-dri:amd64 \
  35. libgl1-mesa-dri:i386 \
  36. libglx-mesa0:amd64 \
  37. libglx-mesa0:i386 \
  38. libvulkan1:amd64 \
  39. libvulkan1:i386 \
  40. steam-launcher \
  41. && apt-get clean \
  42. && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
  43. USER 1000:1000
  44. ENV DISPLAY=:20 \
  45. HOME=/home/ubuntu \
  46. USER=ubuntu \
  47. XDG_RUNTIME_DIR=/tmp/runtime-ubuntu \
  48. PIPEWIRE_RUNTIME_DIR=/tmp/runtime-ubuntu \
  49. PULSE_RUNTIME_PATH=/tmp/runtime-ubuntu/pulse \
  50. PULSE_SERVER=unix:/tmp/runtime-ubuntu/pulse/native \
  51. NVIDIA_VISIBLE_DEVICES=all \
  52. NVIDIA_DRIVER_CAPABILITIES=all
  53. WORKDIR /home/ubuntu
  54. EXPOSE 47984-47990/tcp
  55. EXPOSE 48010/tcp
  56. EXPOSE 47998-48000/udp
  57. ENTRYPOINT ["/etc/sunshine-entrypoint.sh"]