Dockerfile.arm 1.5 KB

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