FROM catthehacker/ubuntu:runner-22.04 ENV PYVERSION="3.9" ENV PATH /home/runner/.local/bin:${PATH} USER root 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 \ && wget -q https://bootstrap.pypa.io/get-pip.py \ && python3 get-pip.py \ && python3 -m pip install --upgrade pip wheel setuptools # cleanup installation RUN \ echo "**** cleanup ****" \ && apt-get purge --auto-remove -y \ && apt-get clean \ && rm -rf \ /tmp/* \ /var/lib/apt/lists/* \ /var/tmp/* COPY rootfs / USER runner