Skip to content

Commit

Permalink
upgrade python and pip version from 3.11.4 to 3.12.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebamus committed Jul 7, 2024
1 parent 3b69246 commit 4ec85d3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions docker/gunicorn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ RUN apt-get install -y build-essential gcc

# Python
RUN apt-get install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev
RUN cd /usr/src ; wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tar.xz ; tar -xf Python-3.11.4.tar.xz ; cd Python-3.11.4 ; ./configure ; make altinstall
RUN cd /usr/src ; wget https://www.python.org/ftp/python/3.12.4/Python-3.12.4.tar.xz ; tar -xf Python-3.12.4.tar.xz ; cd Python-3.12.4 ; ./configure ; make altinstall

# be sure it's 3.11.4
RUN ! ls /usr/local/bin/python3.11.4 && ls /usr/src/Python-3.11.4/python && cp /usr/src/Python-3.11.4/python /usr/local/bin/python3.11.4 ; exit 0
# be sure it's 3.12.4
RUN ! ls /usr/local/bin/python3.12.4 && ls /usr/src/Python-3.12.4/python && cp /usr/src/Python-3.12.4/python /usr/local/bin/python3.12.4 ; exit 0

# replace python version to have 3.11.4 as default
# replace python version to have 3.12.4 as default
RUN rm -f /usr/bin/python
RUN rm -f /usr/bin/python3
RUN ln -s /usr/local/bin/python3.11.4 /usr/bin/python
RUN ln -s /usr/local/bin/python3.11.4 /usr/bin/python3
RUN ln -s /usr/local/bin/python3.11.4 /usr/local/bin/python
RUN ln -s /usr/local/bin/python3.11.4 /usr/local/bin/python3
RUN ln -s /usr/local/bin/python3.12.4 /usr/bin/python
RUN ln -s /usr/local/bin/python3.12.4 /usr/bin/python3
RUN ln -s /usr/local/bin/python3.12.4 /usr/local/bin/python
RUN ln -s /usr/local/bin/python3.12.4 /usr/local/bin/python3

ENV PYTHONUNBUFFERED 1

Expand Down
16 changes: 8 additions & 8 deletions docker/uwsgi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ RUN apt-get install -y build-essential gcc

# Python
RUN apt-get install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev
RUN cd /usr/src ; wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tar.xz ; tar -xf Python-3.11.4.tar.xz ; cd Python-3.11.4 ; ./configure ; make altinstall
RUN cd /usr/src ; wget https://www.python.org/ftp/python/3.12.4/Python-3.12.4.tar.xz ; tar -xf Python-3.12.4.tar.xz ; cd Python-3.12.4 ; ./configure ; make altinstall

# be sure it's 3.11.4
RUN ! ls /usr/local/bin/python3.11.4 && ls /usr/src/Python-3.11.4/python && cp /usr/src/Python-3.11.4/python /usr/local/bin/python3.11.4 ; exit 0
# be sure it's 3.12.4
RUN ! ls /usr/local/bin/python3.12.4 && ls /usr/src/Python-3.12.4/python && cp /usr/src/Python-3.12.4/python /usr/local/bin/python3.12.4 ; exit 0

# replace python version to have 3.11.4 as default
# replace python version to have 3.12.4 as default
RUN rm -f /usr/bin/python
RUN rm -f /usr/bin/python3
RUN ln -s /usr/local/bin/python3.11.4 /usr/bin/python
RUN ln -s /usr/local/bin/python3.11.4 /usr/bin/python3
RUN ln -s /usr/local/bin/python3.11.4 /usr/local/bin/python
RUN ln -s /usr/local/bin/python3.11.4 /usr/local/bin/python3
RUN ln -s /usr/local/bin/python3.12.4 /usr/bin/python
RUN ln -s /usr/local/bin/python3.12.4 /usr/bin/python3
RUN ln -s /usr/local/bin/python3.12.4 /usr/local/bin/python
RUN ln -s /usr/local/bin/python3.12.4 /usr/local/bin/python3

# create links to pip3.11
RUN ln -s /usr/local/bin/pip3.11 /usr/bin/pip
Expand Down

0 comments on commit 4ec85d3

Please sign in to comment.