Skip to content

Commit 98675c4

Browse files
committed
PYENV used to get newer python
1 parent 3083b53 commit 98675c4

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@ ENV APT_INSTALL="apt-get -y install --no-install-recommends"
66
ENV APT_UPDATE="apt-get -y update"
77
ENV PIP_INSTALL="python3 -m pip install --no-cache-dir"
88

9+
ENV PYTHON_VERSION 3.13-dev
10+
911
ADD https://deb.nodesource.com/setup_18.x /tmp
1012
ADD https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb /tmp
1113
ADD https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb /tmp
14+
ADD https://pyenv.run /tmp/pyenv.run
1215
COPY dist/bzt*whl /tmp
1316

1417
WORKDIR /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
2430
RUN $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"]
4651
RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv
4752
RUN git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build
4853
RUN echo '# rbenv setup' > /etc/profile.d/rbenv.sh

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ python-socketio>=5.8.0
1919
h11>=0.16.0
2020
websocket-client>=1.5.1
2121
urllib3==1.26.17
22-
# Set setuptools to 65.5.0 until this issue will be resolved https://github.com/pypa/setuptools/issues/4496
23-
# 65.5.0 is last version that supports python 3.7.0
24-
setuptools==65.5.0
22+
# Lst which support python 3.8
23+
setuptools>=79.0.1
24+
packaging>=24.0

0 commit comments

Comments
 (0)