docker-runner-python-build/Dockerfile.py311

35 lines
916 B
Docker
Raw Normal View History

FROM catthehacker/ubuntu:runner-22.04
2023-08-14 11:02:39 +02:00
ENV PYVERSION="3.11"
2023-08-14 15:11:24 +02:00
ENV PATH /home/runner/.local/bin:${PATH}
2023-08-14 14:27:22 +02:00
USER root
2023-08-14 11:02:39 +02:00
RUN \
echo "*** installing python ${PYVERSION} ***" \
&& apt install -y software-properties-common wget \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt update \
&& apt remove -y python* \
&& apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
&& ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
&& ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python3 \
2023-08-14 11:02:39 +02:00
&& wget -q https://bootstrap.pypa.io/get-pip.py \
&& python3 get-pip.py \
2023-08-14 11:02:39 +02:00
&& python3 -m pip install --upgrade pip wheel setuptools
# cleanup installation
RUN \
echo "**** cleanup ****" \
&& apt-get purge --auto-remove -y \
&& apt-get clean \
&& rm -rf \
2023-08-14 11:02:39 +02:00
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
2023-12-05 00:18:51 +01:00
COPY rootfs /
USER runner