28 lines
920 B
Docker
28 lines
920 B
Docker
FROM catthehacker/ubuntu:runner-22.04
|
|
|
|
ENV PATH /usr/local/bin:$PATH
|
|
|
|
ENV PYVERSION="3.8"
|
|
|
|
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 python* \
|
|
&& sudo apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
|
|
&& sudo ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
|
|
&& sudo ln -s -f /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/*
|