Dockerfile 812 B

123456789101112131415161718192021222324252627
  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 jellyfin/ffmpeg 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. && mkdir -p /cache /config /media \
  20. && chmod 777 /cache /config /media
  21. COPY --from=ffmpeg / /
  22. COPY --from=builder /jellyfin /jellyfin
  23. EXPOSE 8096
  24. VOLUME /cache /config /media
  25. ENTRYPOINT dotnet /jellyfin/jellyfin.dll --datadir /config --cachedir /cache