Dockerfile.arm 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Requires binfm_misc registration
  2. # https://github.com/multiarch/qemu-user-static#binfmt_misc-register
  3. ARG DOTNET_VERSION=3.1
  4. FROM node:alpine as web-builder
  5. ARG JELLYFIN_WEB_VERSION=master
  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. # Discard objs - may cause failures if exists
  17. RUN find . -type d -name obj | xargs -r rm -r
  18. # Build
  19. RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-arm "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
  20. FROM multiarch/qemu-user-static:x86_64-arm as qemu
  21. FROM debian:stretch-slim
  22. COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin
  23. RUN apt-get update \
  24. && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
  25. libssl-dev \
  26. && rm -rf /var/lib/apt/lists/* \
  27. && mkdir -p /cache /config /media \
  28. && chmod 777 /cache /config /media
  29. COPY --from=builder /jellyfin /jellyfin
  30. COPY --from=web-builder /dist /jellyfin/jellyfin-web
  31. ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
  32. EXPOSE 8096
  33. VOLUME /cache /config /media
  34. ENTRYPOINT ["./jellyfin/jellyfin", \
  35. "--datadir", "/config", \
  36. "--cachedir", "/cache", \
  37. "--ffmpeg", "/usr/bin/ffmpeg"]