Dockerfile.arm 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # DESIGNED FOR BUILDING ON AMD64 ONLY
  2. #####################################
  3. # Requires binfm_misc registration
  4. # https://github.com/multiarch/qemu-user-static#binfmt_misc-register
  5. ARG DOTNET_VERSION=3.1
  6. FROM node:alpine as web-builder
  7. ARG JELLYFIN_WEB_VERSION=master
  8. RUN apk add curl git \
  9. && curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
  10. && cd jellyfin-web-* \
  11. && yarn install \
  12. && yarn build \
  13. && mv dist /dist
  14. FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
  15. WORKDIR /repo
  16. COPY . .
  17. ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
  18. # Discard objs - may cause failures if exists
  19. RUN find . -type d -name obj | xargs -r rm -r
  20. # Build
  21. RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-arm "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
  22. FROM multiarch/qemu-user-static:x86_64-arm as qemu
  23. FROM arm32v7/debian:buster-slim
  24. COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin
  25. RUN apt-get update \
  26. && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
  27. libssl-dev ca-certificates \
  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. ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
  34. EXPOSE 8096
  35. VOLUME /cache /config /media
  36. ENTRYPOINT ["./jellyfin/jellyfin", \
  37. "--datadir", "/config", \
  38. "--cachedir", "/cache", \
  39. "--ffmpeg", "/usr/bin/ffmpeg"]