2023-09-04 23:26:09 +02:00
|
|
|
FROM catthehacker/ubuntu:runner-22.04
|
2023-08-14 11:02:39 +02:00
|
|
|
|
|
|
|
ENV PYVERSION="3.10"
|
|
|
|
|
2023-08-14 15:11:24 +02:00
|
|
|
ENV PATH /home/runner/.local/bin:${PATH}
|
2023-08-14 14:27:22 +02:00
|
|
|
|
2023-09-04 23:26:09 +02:00
|
|
|
USER root
|
|
|
|
|
2023-08-14 11:02:39 +02:00
|
|
|
RUN \
|
|
|
|
echo "*** installing python ${PYVERSION} ***" \
|
2023-09-04 23:26:09 +02:00
|
|
|
&& 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 \
|
2023-09-04 23:26:09 +02:00
|
|
|
&& 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 ****" \
|
2023-09-04 23:26:09 +02:00
|
|
|
&& 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-09-04 23:26:09 +02:00
|
|
|
|
2023-12-05 00:18:51 +01:00
|
|
|
COPY rootfs /
|
|
|
|
|
2023-09-04 23:26:09 +02:00
|
|
|
USER runner
|