Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-cmake . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-samurai . /
COPY --from=stagex/core-openssl . /
ADD fetch/v${VERSION}.tar.gz .
WORKDIR /json-${VERSION}
RUN --network=none <<-EOF
set -eux
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DJSON_MultipleHeaders=ON
cmake --build build
DESTDIR="/rootfs" cmake --install build
install -Dm644 -t /rootfs/usr/share/licenses/nlohmann-json/ LICENSE.MIT
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /