FROM scratch AS base ARG ARCH=x86_64 ENV VERSION=6.3.0 ENV SRC_HASH=a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898 ENV SRC_FILE=gmp-${VERSION}.tar.xz ENV SRC_SITE=https://gmplib.org/download/gmp/${SRC_FILE} FROM base AS fetch ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} . FROM fetch AS build COPY --from=stagex/busybox . / COPY --from=stagex/binutils . / COPY --from=stagex/musl . / COPY --from=stagex/make . / COPY --from=stagex/perl . / COPY --from=stagex/autoconf . / COPY --from=stagex/automake . / COPY --from=stagex/libtool . / COPY --from=stagex/m4 . / COPY --from=stagex/gcc . / RUN --network=none tar -xf ${SRC_FILE} WORKDIR gmp-${VERSION} RUN --network=none <