Dockerfile.arm 1.5 KB

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