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-samurai . /
COPY --from=stagex/core-cmake . /
COPY --from=stagex/core-openssl . /
ADD fetch/doctest-${VERSION}.tar.gz .
WORKDIR /doctest-${VERSION}
RUN --network=none <<-EOF
set -eux
cmake \
-G Ninja \
-B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=None
cmake --build build
DESTDIR=/rootfs cmake --install build
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /