Dockerfile 920 B

1234567891011121314151617181920212223242526272829
  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. EXPOSE 8096
  22. VOLUME /cache /config /media
  23. ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
  24. --datadir /config \
  25. --cachedir /cache \
  26. --ffmpeg /usr/local/bin/ffmpeg \
  27. --ffprobe /usr/local/bin/ffprobe