Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-python . /
COPY --from=stagex/core-py-wheel . /
COPY --from=stagex/core-py-pep517 . /
COPY --from=stagex/core-py-build . /
COPY --from=stagex/core-py-toml . /
COPY --from=stagex/core-py-flit . /
COPY --from=stagex/core-py-packaging . /
COPY --from=stagex/core-zlib . /
ADD fetch/py-installer-${VERSION}.tar.gz .
WORKDIR /installer-${VERSION}
RUN --network=none <<-EOF
set -eu
python -m build -wn --skip-dependency-check
PYTHONPATH=src python -m installer --destdir=/rootfs dist/*.whl
rm /rootfs/usr/lib/python*/site-packages/installer/_scripts/*.exe
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /