Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-zlib . /
COPY --from=stagex/core-gawk . /
COPY --from=stagex/core-bzip2 . /
COPY --from=stagex/core-readline . /
COPY --from=stagex/core-libzstd . /
COPY --from=stagex/core-perl . /
COPY --from=stagex/core-autoconf . /
COPY --from=stagex/core-automake . /
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-linux-headers . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-libtool . /
COPY --from=stagex/core-m4 . /
COPY --from=stagex/core-libedit . /
COPY --from=stagex/core-ncurses . /
ADD fetch/pcre2-${VERSION}.tar.gz .
WORKDIR /pcre2-pcre2-${VERSION}
RUN --network=none <<-EOF
set -eux
./autogen.sh
./configure \
CFLAGS="-O3" \
--disable-shared \
--prefix=/usr \
--docdir=/usr/share/doc/pcre2-10.43 \
--htmldir=/usr/share/doc/pcre2-10.43/html \
--enable-pcre2-16 \
--enable-pcre2-32 \
--enable-pcre2grep-libz \
--enable-pcre2test-libedit
make -j "$(nproc)"
make DESTDIR=/rootfs install
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /