Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-perl . /
ADD fetch/attr-${VERSION}.tar.gz .
WORKDIR /attr-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/usr \
--exec-prefix=/ \
--sbindir=/bin \
--bindir=/usr/bin \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--includedir=/usr/include \
--mandir=/usr/share/man \
--docdir=/usr/share/doc/attr \
--datadir=/usr/share \
--disable-nls
make -j "$(nproc)"
make DESTDIR=/rootfs install
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /