Source
FROM stagex/pallet-gcc-gnu-busybox AS build
ARG VERSION
COPY --from=stagex/core-openssl . /
COPY --from=stagex/core-pcre2 . /
COPY --from=stagex/user-unixodbc . /
COPY --from=stagex/user-libevent . /
COPY --from=stagex/user-argon2 . /
COPY --from=stagex/user-groff . /
ADD fetch/openldap-${VERSION}.tgz .
WORKDIR /openldap-${VERSION}
ENV SOURCE_DATE_EPOCH=1
RUN --network=none <<-EOF
set -eux
./configure \
--enable-slapd \
--enable-modules \
--enable-dnssrv=mod \
--enable-ldap=mod \
--enable-mdb=mod \
--enable-meta=mod \
--enable-asyncmeta=mod \
--enable-null=mod \
--enable-passwd=mod \
--enable-relay=mod \
--enable-sock=mod \
--enable-sql=mod \
--enable-overlays=mod \
--enable-balancer=mod \
--enable-argon2
make -j "$(nproc)"
make DESTDIR=/rootfs install
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /