packages/

numactl

Details
Source
FROM scratch AS base
ENV VERSION=2.0.18
ENV SRC_HASH=b4fc0956317680579992d7815bc43d0538960dc73aa1dd8ca7e3806e30bc1274
ENV SRC_FILE=numactl-${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/numactl/numactl/releases/download/v${VERSION}/${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/linux-headers . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
COPY --from=stagex/gperf . /

RUN --network=none tar -xf ${SRC_FILE}
WORKDIR /numactl-${VERSION}
RUN --network=none <<EOF
	set -eux
	./configure \
        --build=x86_64-linux-musl \
        --host=x86_64-linux-musl \
        --prefix=/usr \
        --mandir=/usr/share/man
	make -j "$(nproc)"
EOF

FROM build AS install
RUN --network=none DESTDIR=/rootfs make install

FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /