Dockerfile.arm64 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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-aarch64 as qemu
  5. FROM alpine as qemu_extract
  6. COPY --from=qemu /usr/bin qemu-aarch64-static.tar.gz
  7. RUN tar -xzvf qemu-aarch64-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-arm64 /jellyfin"
  19. FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8
  20. COPY --from=qemu_extract qemu-aarch64-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. ARG JELLYFIN_WEB_VERSION=10.2.2
  27. RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
  28. && rm -rf /jellyfin/jellyfin-web \
  29. && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web
  30. EXPOSE 8096
  31. VOLUME /cache /config /media
  32. ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
  33. --datadir /config \
  34. --cachedir /cache \
  35. --ffmpeg /usr/bin/ffmpeg \
  36. --ffprobe /usr/bin/ffprobe