FROM scratch AS base ENV VERSION=0.22.5 ENV SRC_HASH=fe10c37353213d78a5b83d48af231e005c4da84db5ce88037d88355938259640 ENV SRC_FILE=gettext-${VERSION}.tar.xz ENV SRC_SITE=https://mirrors.kernel.org/gnu/gettext/${SRC_FILE} FROM base AS fetch ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} . FROM fetch AS build COPY --from=stagex/busybox . / COPY --from=stagex/gcc . / COPY --from=stagex/binutils . / COPY --from=stagex/libxml2 . / COPY --from=stagex/make . / COPY --from=stagex/musl . / RUN tar -xf ${SRC_FILE} WORKDIR /gettext-${VERSION} RUN <<-EOF set -eux ./configure \ --prefix=/usr \ --enable-threads=posix \ --disable-java \ --enable-static \ --with-included-libxml=no make -j "$(nproc)" EOF FROM build AS install RUN --network=none make DESTDIR=/rootfs install FROM stagex/filesystem AS package COPY --from=install /rootfs/. /