Dockerfile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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 bash -c "source deployment/common.build.sh && \
  7. build_jellyfin Jellyfin.Server Release linux-x64 /jellyfin"
  8. FROM jellyfin/ffmpeg as ffmpeg
  9. FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
  10. # libfontconfig1 is required for Skia
  11. RUN apt-get update \
  12. && apt-get install --no-install-recommends --no-install-suggests -y \
  13. libfontconfig1 \
  14. && apt-get clean autoclean \
  15. && apt-get autoremove \
  16. && rm -rf /var/lib/{apt,dpkg,cache,log} \
  17. && mkdir -p /cache /config /media \
  18. && chmod 777 /cache /config /media
  19. COPY --from=ffmpeg / /
  20. COPY --from=builder /jellyfin /jellyfin
  21. ARG JELLYFIN_WEB_VERSION=10.2.2
  22. RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
  23. && rm -rf /jellyfin/jellyfin-web \
  24. && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web
  25. EXPOSE 8096
  26. VOLUME /cache /config /media
  27. ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
  28. --datadir /config \
  29. --cachedir /cache \
  30. --ffmpeg /usr/local/bin/ffmpeg \
  31. --ffprobe /usr/local/bin/ffprobe