Dockerfile.arm64 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ARG DOTNET_VERSION=3.1
  2. FROM node:alpine as web-builder
  3. ARG JELLYFIN_WEB_VERSION=master
  4. RUN apk add curl \
  5. && curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
  6. && cd jellyfin-web-* \
  7. && yarn install \
  8. && yarn build \
  9. && mv dist /dist
  10. FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
  11. WORKDIR /repo
  12. COPY . .
  13. ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
  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 Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-arm64 "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
  18. FROM debian:buster-slim
  19. RUN apt-get update \
  20. && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
  21. libssl-dev ca-certificates \
  22. && rm -rf /var/lib/apt/lists/* \
  23. && mkdir -p /cache /config /media \
  24. && chmod 777 /cache /config /media
  25. COPY --from=builder /jellyfin /jellyfin
  26. COPY --from=web-builder /dist /jellyfin/jellyfin-web
  27. ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
  28. EXPOSE 8096
  29. VOLUME /cache /config /media
  30. ENTRYPOINT ["./jellyfin/jellyfin", \
  31. "--datadir", "/config", \
  32. "--cachedir", "/cache", \
  33. "--ffmpeg", "/usr/bin/ffmpeg"]