Dockerfile.arm 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 microsoft/dotnet:${DOTNET_VERSION}-sdk-stretch 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 microsoft/dotnet:${DOTNET_VERSION}-runtime-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. && mkdir -p /cache /config /media \
  24. && chmod 777 /cache /config /media
  25. COPY --from=builder /jellyfin /jellyfin
  26. EXPOSE 8096
  27. VOLUME /cache /config /media
  28. ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
  29. --datadir /config \
  30. --cachedir /cache \
  31. --ffmpeg /usr/bin/ffmpeg \
  32. --ffprobe /usr/bin/ffprobe