Dockerfile 753 B

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