23 lines
666 B
Docker
23 lines
666 B
Docker
FROM scratch AS base
|
|
ENV VERSION=68.2.2
|
|
ENV SRC_HASH=4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87
|
|
ENV SRC_FILE=setuptools-${VERSION}.tar.gz
|
|
ENV SRC_SITE=https://pypi.io/packages/source/s/setuptools/${SRC_FILE}
|
|
|
|
FROM base AS fetch
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
|
|
|
FROM fetch AS build
|
|
COPY --from=stagex/busybox . /
|
|
COPY --from=stagex/musl . /
|
|
COPY --from=stagex/python . /
|
|
COPY --from=stagex/zlib . /
|
|
RUN tar -xzf ${SRC_FILE}
|
|
WORKDIR /setuptools-${VERSION}
|
|
RUN python setup.py build
|
|
|
|
FROM build AS install
|
|
RUN --network=none python setup.py install --root=/rootfs
|
|
|
|
FROM stagex/filesystem AS package
|
|
COPY --from=install /rootfs/. /
|