Dockerfile 725 B

12345678910111213141516171819202122232425
  1. ARG DOTNET_VERSION=2
  2. FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder
  3. WORKDIR /repo
  4. COPY . .
  5. ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
  6. RUN dotnet publish \
  7. --configuration release \
  8. --output /jellyfin \
  9. Jellyfin.Server
  10. FROM jrottenberg/ffmpeg:4.0-vaapi as ffmpeg
  11. FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
  12. # libfontconfig1 is required for Skia
  13. RUN apt-get update \
  14. && apt-get install --no-install-recommends --no-install-suggests -y \
  15. libfontconfig1 \
  16. && apt-get clean autoclean \
  17. && apt-get autoremove \
  18. && rm -rf /var/lib/{apt,dpkg,cache,log}
  19. COPY --from=ffmpeg / /
  20. COPY --from=builder /jellyfin /jellyfin
  21. EXPOSE 8096
  22. VOLUME /config /media
  23. ENTRYPOINT dotnet /jellyfin/jellyfin.dll --datadir /config