Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/pallet-python . /
COPY --from=stagex/core-py-setuptools . /
COPY --from=stagex/core-py-wheel . /
COPY --from=stagex/user-py-pyasn1 . /
ADD fetch/py-ldap3-${VERSION}.tar.gz .
WORKDIR /ldap3-${VERSION}/
RUN --network=none <<-EOF
set -eu
python setup.py build
python setup.py install -O1 --root=/rootfs
install -Dm644 LICENSE.txt /rootfs/usr/share/licenses/py-ldap3/LICENSE.txt
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/core-filesystem AS py-ldap3
COPY --from=build /rootfs /