Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-openssl . /
COPY --from=stagex/core-perl . /
COPY --from=stagex/core-ca-certificates . /
ADD fetch/curl-${VERSION}.tar.xz .
WORKDIR /curl-${VERSION}
ENV SOURCE_DATE_EPOCH=1
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
--with-openssl \
--enable-static-link
make -j "$(nproc)"
make install DESTDIR=/rootfs
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /