build: upgrade edxapp docker image to python 3.11 (#34982)
* build: upgrade edxapp docker image to python 3.11 --------- Co-authored-by: Tim McCormack <tmccormack@edx.org>
This commit is contained in:
3
.github/workflows/docker-publish.yml
vendored
3
.github/workflows/docker-publish.yml
vendored
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
# Push image to GitHub Packages.
|
||||
# See also https://docs.docker.com/docker-hub/builds/
|
||||
@@ -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 }}
|
||||
|
||||
24
Dockerfile
24
Dockerfile
@@ -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 \
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user