FROM ubuntu:18.04 ARG DEBIAN_FRONTEND=noninteractive COPY common.sh lib.sh / RUN /common.sh COPY cmake.sh / RUN /cmake.sh COPY xargo.sh / RUN /xargo.sh COPY musl.sh / RUN /musl.sh TARGET=i586-linux-musl COPY qemu.sh / RUN /qemu.sh i386 ENV CROSS_MUSL_SYSROOT=/usr/local/i586-linux-musl COPY musl-symlink.sh / RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT i386 COPY qemu-runner / ENV CARGO_TARGET_I586_UNKNOWN_LINUX_MUSL_LINKER=i586-linux-musl-gcc \ CARGO_TARGET_I586_UNKNOWN_LINUX_MUSL_RUNNER="/qemu-runner i586" \ CC_i586_unknown_linux_musl=i586-linux-musl-gcc \ CXX_i586_unknown_linux_musl=i586-linux-musl-g++ \ BINDGEN_EXTRA_CLANG_ARGS_i586_unknown_linux_musl="--sysroot=$CROSS_MUSL_SYSROOT" \ QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT