2023-08-14 14:41:24 +02:00
|
|
|
FROM catthehacker/ubuntu:runner-22.04-20230729
|
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
|
|
|
|
2023-08-14 11:02:39 +02:00
|
|
|
RUN \
|
|
|
|
echo "*** installing python ${PYVERSION} ***" \
|
|
|
|
&& sudo apt install -y software-properties-common wget \
|
|
|
|
&& sudo add-apt-repository -y ppa:deadsnakes/ppa \
|
|
|
|
&& sudo apt update \
|
2023-08-14 11:10:19 +02:00
|
|
|
&& sudo apt remove -y python* \
|
2023-08-14 11:02:39 +02:00
|
|
|
&& sudo apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
|
2023-08-14 11:10:19 +02:00
|
|
|
&& sudo ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
|
|
|
|
&& sudo 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 \
|
|
|
|
&& 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/*
|