Dockerfile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. FROM debian:bullseye
  2. LABEL maintainer="Lovell Fuller <npm@lovell.info>"
  3. # Create Debian-based container suitable for cross-compiling Linux ARM64v8-A binaries
  4. # Path settings
  5. ENV \
  6. RUSTUP_HOME="/usr/local/rustup" \
  7. CARGO_HOME="/usr/local/cargo" \
  8. PATH="/usr/local/cargo/bin:$PATH"
  9. # Build dependencies
  10. RUN \
  11. apt-get update && \
  12. apt-get install -y curl && \
  13. dpkg --add-architecture arm64 && \
  14. apt-get update && \
  15. apt-get install -y \
  16. advancecomp \
  17. autoconf \
  18. autopoint \
  19. brotli \
  20. cmake \
  21. crossbuild-essential-arm64 \
  22. gettext \
  23. git \
  24. gobject-introspection \
  25. gperf \
  26. gtk-doc-tools \
  27. intltool \
  28. jq \
  29. libglib2.0-dev \
  30. libtool \
  31. nasm \
  32. ninja-build \
  33. python3-pip \
  34. texinfo \
  35. && \
  36. curl https://sh.rustup.rs -sSf | sh -s -- -y \
  37. --no-modify-path \
  38. --profile minimal \
  39. && \
  40. rustup target add aarch64-unknown-linux-gnu && \
  41. pip3 install meson==0.55.3
  42. # Compiler settings
  43. ENV \
  44. PKG_CONFIG="/usr/bin/aarch64-linux-gnu-pkg-config" \
  45. PLATFORM="linux-arm64v8" \
  46. CHOST="aarch64-linux-gnu" \
  47. RUST_TARGET="aarch64-unknown-linux-gnu" \
  48. FLAGS="-march=armv8-a -O3 -fPIC -D_GLIBCXX_USE_CXX11_ABI=0" \
  49. MESON="--cross-file=/root/meson.ini"
  50. COPY Toolchain.cmake /root/
  51. COPY meson.ini /root/