Source
FROM stagex/pallet-gcc-gnu-busybox AS build
ARG VERSION
COPY --from=stagex/user-libnftnl . /
COPY --from=stagex/user-libmnl . /
ADD fetch/iptables-${VERSION}.tar.xz .
WORKDIR /iptables-${VERSION}
RUN --network=none <<-EOF
set -eux
/usr/bin/autoreconf -vif
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--sysconfdir=/etc \
--sbindir=/usr/sbin \
--without-kernel \
--enable-devel \
--enable-libipq \
--enable-shared
make -j "$(nproc)"
make install DESTDIR=/rootfs
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /