@@ -6,19 +6,25 @@ ENV APT_INSTALL="apt-get -y install --no-install-recommends"
66ENV APT_UPDATE="apt-get -y update"
77ENV PIP_INSTALL="python3 -m pip install --no-cache-dir"
88
9+ ENV PYTHON_VERSION 3.13-dev
10+
911ADD https://deb.nodesource.com/setup_18.x /tmp
1012ADD https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb /tmp
1113ADD https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb /tmp
14+ ADD https://pyenv.run /tmp/pyenv.run
1215COPY dist/bzt*whl /tmp
1316
1417WORKDIR /tmp
18+ SHELL ["/bin/bash" , "-c" ]
1519
16- # add PPA for python 3.1
17- RUN $APT_UPDATE && $APT_INSTALL software-properties-common gpg-agent && add-apt-repository ppa:deadsnakes/ppa
18- # add node repo and call 'apt-get update'
19- RUN bash ./setup_18.x && $APT_INSTALL build-essential python3-pip python3.13-dev net-tools apt-utils
20+ # add node repo and call 'apt-get update' and prepare dependencies for python pyenv build
21+ RUN bash ./setup_18.x && $APT_INSTALL make build-essential net-tools apt-utils libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
22+ libsqlite3-dev wget curl llvm libncurses-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git
2023
21- RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 1
24+ # pyenv install python
25+ ENV PYENV_ROOT /root/.pyenv
26+ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
27+ RUN chmod +x ./pyenv.run && ./pyenv.run && pyenv update && pyenv install $PYTHON_VERSION && pyenv global $PYTHON_VERSION && pyenv rehash && python3 --version
2228
2329# Fix vulnerabilities / outdated versions
2430RUN $PIP_INSTALL --user --upgrade pip oauthlib pyjwt httplib2 numpy fonttools wheel
@@ -42,7 +48,6 @@ RUN curl -fSL --output dotnet.tar.gz https://download.visualstudio.microsoft.com
4248 && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
4349
4450# Install rbenv and ruby-build
45- SHELL ["/bin/bash" , "-c" ]
4651RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv
4752RUN git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build
4853RUN echo '# rbenv setup' > /etc/profile.d/rbenv.sh
0 commit comments