Dockerfile 817 B

123456789101112131415161718192021222324
  1. ARG DOTNET_VERSION=2
  2. ARG FFMPEG_URL=https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-4.0.3-64bit-static.tar.xz
  3. FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder
  4. WORKDIR /repo
  5. COPY . .
  6. RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \
  7. && dotnet clean \
  8. && dotnet publish --configuration release --output /jellyfin
  9. FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
  10. COPY --from=builder /jellyfin /jellyfin
  11. EXPOSE 8096
  12. VOLUME /config /media
  13. RUN apt update \
  14. && apt install -y xz-utils \
  15. && curl ${FFMPEG_URL} | tar Jxf - -C /usr/bin --wildcards --strip-components=1 ffmpeg*/ffmpeg ffmpeg*/ffprobe \
  16. && apt remove -y xz-utils
  17. ENTRYPOINT if [ -n "$PUID$PGUID" ]; \
  18. then echo "PUID/PGID are deprecated. Use Docker user param." >&2; exit 1; \
  19. else dotnet /jellyfin/jellyfin.dll -programdata /config; fi