FROM clux/muslrust:stable as builder RUN apt-get update && apt-get install -y --no-install-recommends bzip2 && rm -rf /var/lib/apt/lists/* ENV TARGET "x86_64-unknown-linux-musl" ENV SYSTEM_DEPS_LINK static # Optional localization support: # To enable uncomment the following commands, replace "--disable-nls" with # "--with-libintl-prefix=$PREFIX". # ARG GETTEXT_VER=0.21 # WORKDIR /usr/src # ADD https://ftp.gnu.org/gnu/gettext/gettext-${GETTEXT_VER}.tar.bz2 ./ # RUN tar -xjf gettext-${GETTEXT_VER}.tar.bz2 # WORKDIR gettext-$GETTEXT_VER # RUN ./configure --host "$TARGET" --prefix="$PREFIX" --with-pic --enable-fast-install --disable-dependency-tracking --without-emacs --disable-java --disable-csharp --disable-c++ # RUN make -j$(nproc) install ARG LIBGPG_ERROR_VER=1.48 WORKDIR /usr/src ADD https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-${LIBGPG_ERROR_VER}.tar.bz2 ./ RUN tar -xjf libgpg-error-${LIBGPG_ERROR_VER}.tar.bz2 WORKDIR libgpg-error-$LIBGPG_ERROR_VER RUN ./configure --host "$TARGET" --prefix="$PREFIX" --with-pic --enable-fast-install --disable-dependency-tracking --enable-static --disable-shared --disable-nls --disable-doc --disable-languages --disable-tests RUN make -j$(nproc) install FROM builder WORKDIR /root/ws COPY ./ ./ CMD ["cargo", "test", "--no-fail-fast"]