Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. FROM alpine:3.11
  2. LABEL maintainer="Lovell Fuller <npm@lovell.info>"
  3. # Create Alpine 3.11 (musl 1.1.24) container suitable for building Linux x64 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. apk update && apk upgrade && \
  12. apk --update --no-cache add \
  13. autoconf \
  14. automake \
  15. binutils \
  16. brotli \
  17. build-base \
  18. cmake \
  19. curl \
  20. findutils \
  21. git \
  22. glib-dev \
  23. gobject-introspection-dev \
  24. gperf \
  25. gtk-doc \
  26. intltool \
  27. jq \
  28. libtool \
  29. linux-headers \
  30. nasm \
  31. ninja \
  32. python3 \
  33. shared-mime-info \
  34. texinfo \
  35. && \
  36. apk --update --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/edge/community/ add advancecomp && \
  37. curl https://sh.rustup.rs -sSf | sh -s -- -y \
  38. --no-modify-path \
  39. --profile minimal \
  40. && \
  41. pip3 install meson==0.55.3
  42. # Compiler settings
  43. ENV \
  44. PLATFORM="linuxmusl-x64" \
  45. FLAGS="-O3 -fPIC"
  46. # Musl defaults to static libs but we need them to be dynamic for host toolchain.
  47. # The toolchain will produce static libs by default.
  48. ENV \
  49. RUSTFLAGS="-C target-feature=-crt-static"
  50. COPY Toolchain.cmake /root/