Skip to content

Commit

Permalink
build: upgrade edxapp docker image to python 3.11 (openedx#34982)
Browse files Browse the repository at this point in the history
* build: upgrade edxapp docker image to python 3.11
---------

Co-authored-by: Tim McCormack <[email protected]>
  • Loading branch information
UsamaSadiq and timmc-edx authored Jun 13, 2024
1 parent 0fc990c commit f7b6fcb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master

jobs:
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand Down Expand Up @@ -35,7 +36,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push lms base docker image
- name: Build and push lms/cms base docker images
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down
24 changes: 14 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,24 @@ RUN useradd -m --shell /bin/false app
RUN echo "locales locales/default_environment_locale select en_US.UTF-8" | debconf-set-selections
RUN echo "locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8" | debconf-set-selections

# Setting up ppa deadsnakes to get python 3.11
RUN apt-get update && \
apt-get install -y software-properties-common && \
apt-add-repository -y ppa:deadsnakes/ppa

# Install requirements that are absolutely necessary
RUN apt-get update && \
apt-get -y dist-upgrade && \
apt-get -y install --no-install-recommends \
python3 \
python3-venv \
python3.8 \
python3.8-minimal \
# python3-dev: required for building mysqlclient python package version 2.2.0
python3-dev \
libpython3.8 \
libpython3.8-stdlib \
python3-pip \
python3.11 \
# python3-dev: required for building mysqlclient python package
python3.11-dev \
python3.11-venv \
libpython3.11 \
libpython3.11-stdlib \
libmysqlclient21 \
# libmysqlclient-dev: required for building mysqlclient python package version 2.2.0
# libmysqlclient-dev: required for building mysqlclient python package
libmysqlclient-dev \
pkg-config \
libssl1.1 \
Expand Down Expand Up @@ -105,7 +109,7 @@ RUN apt-get update && \

# Setup python virtual environment
# It is already 'activated' because $VIRTUAL_ENV/bin was put on $PATH
RUN python3.8 -m venv "${VIRTUAL_ENV}"
RUN python3.11 -m venv "${VIRTUAL_ENV}"

# Install python requirements
# Requires copying over requirements files, but not entire repository
Expand Down

0 comments on commit f7b6fcb

Please sign in to comment.