fix: revert to apt-installed python
This commit is contained in:
parent
35080fd3b0
commit
1646584afc
1 changed files with 4 additions and 38 deletions
|
@ -3,8 +3,6 @@ FROM ubuntu:22.04 as skeleton
|
||||||
ENV NODE_VERSION "20.12.2"
|
ENV NODE_VERSION "20.12.2"
|
||||||
ENV NVM_VERSION "0.37.2"
|
ENV NVM_VERSION "0.37.2"
|
||||||
|
|
||||||
ENV PYTHON_VERSION "3.12"
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
ENV TZ Etc/UTC
|
ENV TZ Etc/UTC
|
||||||
|
|
||||||
|
@ -17,39 +15,15 @@ RUN apt update && \
|
||||||
git \
|
git \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
python3 \
|
||||||
|
python3-venv \
|
||||||
|
python3-pip \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
--autoremove && \
|
--autoremove && \
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
||||||
COPY ./files/registries.conf /etc/containers/registries.conf
|
COPY ./files/registries.conf /etc/containers/registries.conf
|
||||||
|
|
||||||
FROM skeleton AS build-python
|
|
||||||
|
|
||||||
RUN apt update && \
|
|
||||||
apt upgrade -y && \
|
|
||||||
apt install -y \
|
|
||||||
build-essential \
|
|
||||||
libssl-dev \
|
|
||||||
zlib1g-dev \
|
|
||||||
libbz2-dev \
|
|
||||||
libreadline-dev \
|
|
||||||
libsqlite3-dev \
|
|
||||||
libncursesw5-dev \
|
|
||||||
tk-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libxmlsec1-dev \
|
|
||||||
libffi-dev \
|
|
||||||
liblzma-dev \
|
|
||||||
--no-install-recommends \
|
|
||||||
--autoremove && \
|
|
||||||
apt-get clean
|
|
||||||
|
|
||||||
RUN curl https://pyenv.run | bash
|
|
||||||
|
|
||||||
ENV PATH /root/.pyenv/bin:$PATH
|
|
||||||
|
|
||||||
RUN pyenv install $PYTHON_VERSION
|
|
||||||
|
|
||||||
FROM skeleton as runner
|
FROM skeleton as runner
|
||||||
|
|
||||||
WORKDIR /runner
|
WORKDIR /runner
|
||||||
|
@ -68,12 +42,4 @@ RUN node --version
|
||||||
|
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|
||||||
COPY --from=build-python /root/.pyenv /root/.pyenv
|
RUN python3 -m pip install pipx
|
||||||
|
|
||||||
ENV PATH /root/.pyenv/bin:/root/.pyenv/shims:$PATH
|
|
||||||
|
|
||||||
RUN pyenv global $PYTHON_VERSION
|
|
||||||
|
|
||||||
RUN python --version
|
|
||||||
|
|
||||||
RUN pip install pipx
|
|
||||||
|
|
Loading…
Reference in a new issue