Dockerfile 845 B

12345678910111213141516171819202122232425262728
  1. ARG DOTNET_VERSION=2
  2. # Download ffmpeg first to allow quicker rebuild of other layers
  3. FROM alpine as ffmpeg
  4. ARG FFMPEG_URL=https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-4.0.3-64bit-static.tar.xz
  5. RUN wget ${FFMPEG_URL} -O - | tar Jxf - \
  6. && mkdir ffmpeg-bin \
  7. && mv ffmpeg*/ffmpeg ffmpeg-bin \
  8. && mv ffmpeg*/ffprobe ffmpeg-bin
  9. FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder
  10. WORKDIR /repo
  11. COPY . .
  12. RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \
  13. && dotnet clean \
  14. && dotnet publish --configuration release --output /jellyfin
  15. FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
  16. COPY --from=builder /jellyfin /jellyfin
  17. COPY --from=ffmpeg /ffmpeg-bin/* /usr/bin/
  18. EXPOSE 8096
  19. VOLUME /config /media
  20. RUN apt update \
  21. && apt install -y libfontconfig1 # needed for Skia
  22. ENTRYPOINT dotnet /jellyfin/jellyfin.dll -programdata /config