Dockerfile.ubuntu.armhf 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. FROM ubuntu:bionic
  2. # Docker build arguments
  3. ARG SOURCE_DIR=/jellyfin
  4. ARG ARTIFACT_DIR=/dist
  5. ARG SDK_VERSION=3.1
  6. # Docker run environment
  7. ENV SOURCE_DIR=/jellyfin
  8. ENV ARTIFACT_DIR=/dist
  9. ENV DEB_BUILD_OPTIONS=noddebs
  10. ENV ARCH=amd64
  11. ENV IS_DOCKER=YES
  12. # Prepare Debian build environment
  13. RUN apt-get update \
  14. && apt-get install -y apt-transport-https debhelper gnupg wget devscripts mmv
  15. # Install dotnet repository
  16. # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
  17. RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
  18. && mkdir -p dotnet-sdk \
  19. && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
  20. && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
  21. # Prepare the cross-toolchain
  22. RUN rm /etc/apt/sources.list \
  23. && export CODENAME="$( lsb_release -c -s )" \
  24. && echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME} main restricted universe multiverse" >>/etc/apt/sources.list.d/amd64.list \
  25. && echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME}-updates main restricted universe multiverse" >>/etc/apt/sources.list.d/amd64.list \
  26. && echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME}-backports main restricted universe multiverse" >>/etc/apt/sources.list.d/amd64.list \
  27. && echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME}-security main restricted universe multiverse" >>/etc/apt/sources.list.d/amd64.list \
  28. && echo "deb [arch=armhf] http://ports.ubuntu.com/ ${CODENAME} main restricted universe multiverse" >>/etc/apt/sources.list.d/armhf.list \
  29. && echo "deb [arch=armhf] http://ports.ubuntu.com/ ${CODENAME}-updates main restricted universe multiverse" >>/etc/apt/sources.list.d/armhf.list \
  30. && echo "deb [arch=armhf] http://ports.ubuntu.com/ ${CODENAME}-backports main restricted universe multiverse" >>/etc/apt/sources.list.d/armhf.list \
  31. && echo "deb [arch=armhf] http://ports.ubuntu.com/ ${CODENAME}-security main restricted universe multiverse" >>/etc/apt/sources.list.d/armhf.list \
  32. && dpkg --add-architecture armhf \
  33. && apt-get update \
  34. && apt-get install -y cross-gcc-dev \
  35. && TARGET_LIST="armhf" cross-gcc-gensource 6 \
  36. && cd cross-gcc-packages-amd64/cross-gcc-6-armhf \
  37. && ln -fs /usr/share/zoneinfo/America/Toronto /etc/localtime \
  38. && apt-get install -y gcc-6-source libstdc++6-armhf-cross binutils-arm-linux-gnueabihf bison flex libtool gdb sharutils netbase libcloog-isl-dev libmpc-dev libmpfr-dev libgmp-dev systemtap-sdt-dev autogen expect chrpath zlib1g-dev zip libc6-dev:armhf linux-libc-dev:armhf libgcc1:armhf libcurl4-openssl-dev:armhf libfontconfig1-dev:armhf libfreetype6-dev:armhf liblttng-ust0:armhf libstdc++6:armhf libssl-dev:armhf
  39. # Link to build script
  40. RUN ln -sf ${SOURCE_DIR}/deployment/build.debian.armhf /build.sh
  41. VOLUME ${SOURCE_DIR}/
  42. VOLUME ${ARTIFACT_DIR}/
  43. ENTRYPOINT ["/build.sh"]