Dockerfile.arm64 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. # Requires binfm_misc registration for aarch64
  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_user_static.tgz
  7. RUN tar -xzvf qemu_user_static.tgz
  8. FROM microsoft/dotnet:${DOTNET_VERSION}-sdk-stretch-arm64v8 as builder
  9. COPY --from=qemu_extract qemu-* /usr/bin
  10. WORKDIR /repo
  11. COPY . .
  12. #TODO Remove or update the sed line when we update dotnet version.
  13. RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \
  14. && find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \; \
  15. && dotnet clean \
  16. && dotnet publish \
  17. --configuration release \
  18. --output /jellyfin \
  19. Jellyfin.Server
  20. FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8
  21. COPY --from=qemu_extract qemu-* /usr/bin
  22. COPY --from=builder /jellyfin /jellyfin
  23. EXPOSE 8096
  24. RUN apt-get update \
  25. && apt-get install -y ffmpeg
  26. VOLUME /config /media
  27. ENTRYPOINT dotnet /jellyfin/jellyfin.dll -programdata /config