Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-samurai . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-linux-headers . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-zlib . /
COPY --from=stagex/core-openssl . /
ADD fetch/cmake-${VERSION}.tar.gz .
WORKDIR /cmake-${VERSION}
RUN --network=none <<-EOF
set -eux
./bootstrap \
--prefix=/usr \
--mandir=/share/man \
--datadir=/share/cmake \
--docdir=/share/doc/cmake \
--no-system-cppdap \
--no-system-curl \
--no-system-jsoncpp \
--generator=Ninja || cat /cmake-3.27.8/Bootstrap.cmk/cmake_bootstrap.log
ninja
DESTDIR=/rootfs bin/cmake -P cmake_install.cmake
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /