2
0

Dockerfile.arm 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Requires binfm_misc registration
  2. # https://github.com/multiarch/qemu-user-static#binfmt_misc-register
  3. ARG DOTNET_VERSION=3.0
  4. FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
  5. WORKDIR /repo
  6. COPY . .
  7. ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
  8. # TODO Remove or update the sed line when we update dotnet version.
  9. RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \;
  10. # Discard objs - may cause failures if exists
  11. RUN find . -type d -name obj | xargs -r rm -r
  12. # Build
  13. RUN bash -c "source deployment/common.build.sh && \
  14. build_jellyfin Jellyfin.Server Release linux-arm /jellyfin"
  15. FROM multiarch/qemu-user-static:x86_64-arm as qemu
  16. FROM mcr.microsoft.com/dotnet/core/runtime:${DOTNET_VERSION}-stretch-slim-arm32v7
  17. COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin
  18. RUN apt-get update \
  19. && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
  20. && rm -rf /var/lib/apt/lists/* \
  21. && mkdir -p /cache /config /media \
  22. && chmod 777 /cache /config /media
  23. COPY --from=builder /jellyfin /jellyfin
  24. ARG JELLYFIN_WEB_VERSION=10.3.7
  25. RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
  26. && rm -rf /jellyfin/jellyfin-web \
  27. && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web
  28. EXPOSE 8096
  29. VOLUME /cache /config /media
  30. ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
  31. --datadir /config \
  32. --cachedir /cache \
  33. --ffmpeg /usr/bin/ffmpeg