Dockerfile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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-bootstrap.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. && rm -f /etc/apt/sources.list.d/steam-bootstrap.list \
  42. && apt-get clean \
  43. && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
  44. USER 1000:1000
  45. ENV DISPLAY=:20 \
  46. HOME=/home/ubuntu \
  47. USER=ubuntu \
  48. XDG_RUNTIME_DIR=/tmp/runtime-ubuntu \
  49. PIPEWIRE_RUNTIME_DIR=/tmp/runtime-ubuntu \
  50. PULSE_RUNTIME_PATH=/tmp/runtime-ubuntu/pulse \
  51. PULSE_SERVER=unix:/tmp/runtime-ubuntu/pulse/native \
  52. NVIDIA_VISIBLE_DEVICES=all \
  53. NVIDIA_DRIVER_CAPABILITIES=all
  54. WORKDIR /home/ubuntu
  55. EXPOSE 47984-47990/tcp
  56. EXPOSE 48010/tcp
  57. EXPOSE 47998-48000/udp
  58. ENTRYPOINT ["/etc/sunshine-entrypoint.sh"]