Guest User

nextpvrdockerfile

a guest
Jun 16th, 2024
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. # Base Image for NextPVR Container & Use of the Label
  2.  
  3. FROM debian:latest
  4.  
  5. LABEL maintainer="blackerthanmoonlight"
  6.  
  7. ## Update the container && Install CA Certificates and add non-free repositories
  8.  
  9. RUN apt update && apt install -y \
  10. ca-certificates \
  11. apt-transport-https
  12.  
  13. RUN sed -i "s/Components: main/Components: main non-free non-free-firmware/" /etc/apt/sources.list.d/debian.sources
  14.  
  15. RUN apt update -y
  16.  
  17. ## DotNet Runtime 6.0 Install via the package manager for Debian 12
  18.  
  19. RUN apt install wget --no-install-recommends -y
  20.  
  21. RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
  22.  
  23. RUN dpkg -i packages-microsoft-prod.deb
  24.  
  25. RUN rm packages-microsoft-prod.deb
  26.  
  27. RUN apt update -y && \
  28. apt install -y aspnetcore-runtime-6.0
  29.  
  30. ## Set ASP Net Core URLs
  31.  
  32. ENV ASPNETCORE_URLS=http://+:80 DOTNET_RUNNING_IN_CONTAINER=true
  33.  
  34. # Install Prerequisites (P2)
  35. RUN apt install --no-install-recommends --no-install-suggests -y \
  36. mediainfo \
  37. libmediainfo-dev \
  38. libc6 \
  39. libgdiplus \
  40. dvb-tools \
  41. libdvbv5-0 \
  42. dtv-scan-tables \
  43. libc6-dev \
  44. hdhomerun-config \
  45. ffmpeg \
  46. unzip
  47.  
  48. # The Intel , Nvidia and AMD Drivers
  49. RUN apt install -y \
  50. mesa-va-drivers \
  51. intel-media-va-driver-non-free
  52.  
  53. # Allow container to run as Non-root
  54.  
  55. RUN groupadd -g 1000 nextpvr; \
  56. useradd -m -u 1000 -g 1000 -s /sbin/nologin nextpvr
  57.  
  58. # NextPVR folder prep
  59.  
  60. RUN mkdir /media/nextpvr \
  61. chown -R nextpvr:nextpvr /media; \
  62. chmod -R ug+rwx /media
  63.  
  64. # Extract Reduced NextPVR File to /media/nextpvr
  65.  
  66. COPY ./NPVR64/. /media/nextpvr
  67.  
  68. # Set NextPVR Userdata Volume
  69.  
  70. VOLUME /media/thenextpvr/userdata/
  71.  
  72. # Change to the NextPVR User
  73.  
  74. USER nextpvr
  75.  
  76. WORKDIR /home/nextpvr
  77.  
  78. # Set Environment Variables for where config data should be stored
  79.  
  80. WORKDIR /media/nextpvr
  81.  
  82. ENV NEXTPVR_DATADIR=/media/nextpvr/data/
  83.  
  84. ENV NEXTPVR_DATADIR_USERDATA=/media/thenextpvr/userdata/
  85.  
  86. # Exposing HTTP and HTTPS Ports
  87.  
  88. EXPOSE 80
  89. EXPOSE 443
  90.  
  91. # Former NextPVR Historical Port
  92. EXPOSE 8866
  93.  
  94. # Change working directory to /media/nextpvr and run the program
  95.  
  96. ENTRYPOINT ["dotnet" , "/media/nextpvr/NextPVRServer.dll"]
  97.  
  98.  
Advertisement
Add Comment
Please, Sign In to add comment