Dockerfile 832 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 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 --datadir /config --cachedir /cache