docker-runner-python-build/Dockerfile.py311
Ivan Schaller bcc4ac9e4f
Some checks failed
build docker container / build-py310 (push) Failing after 3m43s
build docker container / build-py311 (push) Failing after 3m48s
build docker container / build-py39 (push) Successful in 9m28s
build docker container / build-py38 (push) Successful in 11m9s
init
2023-08-14 11:02:39 +02:00

28 lines
916 B
Docker

FROM catthehacker/ubuntu:runner-22.04
ENV PATH /usr/local/bin:$PATH
ENV PYVERSION="3.11"
RUN \
echo "*** installing python ${PYVERSION} ***" \
&& sudo apt install -y software-properties-common wget \
&& sudo add-apt-repository -y ppa:deadsnakes/ppa \
&& sudo apt update \
&& sudo apt remove -y python3* \
&& sudo apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
&& sudo ln -s /usr/bin/python${PYVERSION} /usr/bin/python \
&& sudo ln -s /usr/bin/python${PYVERSION} /usr/bin/python3 \
&& wget -q https://bootstrap.pypa.io/get-pip.py \
&& sudo python3 get-pip.py \
&& python3 -m pip install --upgrade pip wheel setuptools
# cleanup installation
RUN \
echo "**** cleanup ****" \
&& sudo apt-get purge --auto-remove -y \
&& sudo apt-get clean \
&& sudo rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*