FROM clux/muslrust:stable as builder RUN apt-get update && apt-get install -y --no-install-recommends bzip2 gnupg && 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.46 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 --enable-install-gpg-error-config RUN make -j$(nproc) install ARG LIBASSUAN_VER=2.5.5 WORKDIR /usr/src ADD https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-${LIBASSUAN_VER}.tar.bz2 ./ RUN tar -xjf libassuan-${LIBASSUAN_VER}.tar.bz2 WORKDIR libassuan-$LIBASSUAN_VER RUN ./configure --host "$TARGET" --prefix="$PREFIX" --with-pic --enable-fast-install --disable-dependency-tracking --enable-static --disable-shared --disable-doc --with-gpg-error-prefix="$PREFIX" RUN make -j$(nproc) install ARG GPGME_VER=1.18.0 WORKDIR /usr/src ADD https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${GPGME_VER}.tar.bz2 ./ RUN tar -xjf gpgme-${GPGME_VER}.tar.bz2 WORKDIR gpgme-$GPGME_VER RUN ./configure --host "$TARGET" --prefix="$PREFIX" --with-pic --enable-fast-install --disable-dependency-tracking --enable-static --disable-shared --disable-languages --disable-gpg-test --with-gpg-error-prefix="$PREFIX" --with-libassuan-prefix="$PREFIX" RUN make -j$(nproc) install FROM builder WORKDIR /root/ws COPY ./ ./ CMD ["cargo", "test", "--no-fail-fast", "--all-features"]