Dockerfile.arm64 1.2 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-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 dotnet publish \
  18. -r linux-arm64 \
  19. --configuration release \
  20. --output /jellyfin \
  21. Jellyfin.Server
  22. FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8
  23. COPY --from=qemu_extract qemu-aarch64-static /usr/bin
  24. RUN apt-get update \
  25. && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
  26. && mkdir -p /cache /config /media \
  27. && chmod 777 /cache /config /media
  28. COPY --from=builder /jellyfin /jellyfin
  29. EXPOSE 8096
  30. VOLUME /cache /config /media
  31. ENTRYPOINT dotnet /jellyfin/jellyfin.dll --datadir /config --cachedir /cache