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/user-skalibs . /
ADD fetch/utmps-${VERSION}.tar.gz .
WORKDIR /utmps-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--enable-shared \
--enable-static \
--prefix=/usr \
--disable-allstatic \
--libdir=/usr/lib \
--libexecdir=/lib/utmps \
--with-lib=/usr/lib \
--with-dynlib=/lib
make -j "$(nproc)"
make DESTDIR=/rootfs install
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /