From 21727084cbeda12bc0e548d63c88d87aba68bd4c Mon Sep 17 00:00:00 2001 From: Kira Miller <31229189+kiram15@users.noreply.github.com> Date: Thu, 19 Feb 2026 03:53:38 +0000 Subject: [PATCH 1/6] fix: pinning setup tools to avoid pkg_resources removal issue --- dockerfiles/course-discovery.Dockerfile | 4 ++++ dockerfiles/ecommerce.Dockerfile | 4 ++++ dockerfiles/edx-exams.Dockerfile | 4 ++++ dockerfiles/edx-notes-api.Dockerfile | 2 ++ dockerfiles/edx-platform.Dockerfile | 4 ++++ dockerfiles/portal-designer.Dockerfile | 4 ++++ dockerfiles/xqueue.Dockerfile | 4 ++++ 7 files changed, 26 insertions(+) diff --git a/dockerfiles/course-discovery.Dockerfile b/dockerfiles/course-discovery.Dockerfile index b427be4..6478d5d 100644 --- a/dockerfiles/course-discovery.Dockerfile +++ b/dockerfiles/course-discovery.Dockerfile @@ -81,6 +81,8 @@ ARG OPENEDX_TRANSLATIONS_REPO ENV DJANGO_SETTINGS_MODULE="course_discovery.settings.production" ENV ATLAS_OPTIONS="--repository=$OPENEDX_TRANSLATIONS_REPO" +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r ${DISCOVERY_CODE_DIR}/requirements/production.txt RUN DISCOVERY_CFG=minimal.yml OPENEDX_ATLAS_PULL=true make pull_translations @@ -96,6 +98,8 @@ RUN curl -L -o ${DISCOVERY_CODE_DIR}/course_discovery/settings/devstack.py https ENV DJANGO_SETTINGS_MODULE="course_discovery.settings.devstack" ENV ATLAS_OPTIONS="--repository=$OPENEDX_TRANSLATIONS_REPO" +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r ${DISCOVERY_CODE_DIR}/requirements/django.txt RUN pip install -r ${DISCOVERY_CODE_DIR}/requirements/local.txt diff --git a/dockerfiles/ecommerce.Dockerfile b/dockerfiles/ecommerce.Dockerfile index 8ba70dd..b84f824 100644 --- a/dockerfiles/ecommerce.Dockerfile +++ b/dockerfiles/ecommerce.Dockerfile @@ -62,6 +62,8 @@ ENV DJANGO_SETTINGS_MODULE "ecommerce.settings.production" RUN mkdir requirements RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/ecommerce/2u/main/requirements/production.txt +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r ${ECOMMERCE_CODE_DIR}/requirements/production.txt # Copy over rest of code. @@ -78,6 +80,8 @@ ENV DJANGO_SETTINGS_MODULE "ecommerce.settings.devstack" RUN mkdir requirements RUN curl -L -o requirements/dev.txt https://raw.githubusercontent.com/edx/ecommerce/2u/main/requirements/dev.txt +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r ${ECOMMERCE_CODE_DIR}/requirements/dev.txt # Devstack related step for backwards compatibility diff --git a/dockerfiles/edx-exams.Dockerfile b/dockerfiles/edx-exams.Dockerfile index d1c0bf6..2c2e2c9 100644 --- a/dockerfiles/edx-exams.Dockerfile +++ b/dockerfiles/edx-exams.Dockerfile @@ -84,6 +84,8 @@ RUN mkdir -p requirements # this prevents the image cache from busting unless the dependencies have changed. RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/edx-exams/main/requirements/production.txt +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" # Dependencies are installed as root so they cannot be modified by the application user. RUN pip install -r requirements/production.txt @@ -97,6 +99,8 @@ FROM app as devstack ENV DJANGO_SETTINGS_MODULE edx_exams.settings.devstack +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/dev.txt CMD while true; do python ./manage.py runserver 0.0.0.0:18740; sleep 2; done diff --git a/dockerfiles/edx-notes-api.Dockerfile b/dockerfiles/edx-notes-api.Dockerfile index 52cace9..32ddcd8 100644 --- a/dockerfiles/edx-notes-api.Dockerfile +++ b/dockerfiles/edx-notes-api.Dockerfile @@ -79,6 +79,8 @@ RUN pip install --upgrade pip setuptools RUN curl -L -o requirements/base.txt https://raw.githubusercontent.com/openedx/edx-notes-api/master/requirements/base.txt RUN curl -L -o requirements/pip.txt https://raw.githubusercontent.com/openedx/edx-notes-api/master/requirements/pip.txt +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install --no-cache-dir -r requirements/base.txt RUN pip install --no-cache-dir -r requirements/pip.txt diff --git a/dockerfiles/edx-platform.Dockerfile b/dockerfiles/edx-platform.Dockerfile index 1e07f62..10da4fd 100644 --- a/dockerfiles/edx-platform.Dockerfile +++ b/dockerfiles/edx-platform.Dockerfile @@ -207,6 +207,8 @@ RUN --mount=type=secret,id=GIT_AUTH_TOKEN \ curl -fLsS -o requirements/edx/assets.txt https://${gh_auth}raw.githubusercontent.com/${EDX_PLATFORM_REPO}/${EDX_PLATFORM_VERSION}/requirements/edx/assets.txt RUN pip install -r requirements/pip.txt +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/edx/base.txt RUN pip install -r requirements/edx/assets.txt @@ -241,6 +243,8 @@ RUN --mount=type=secret,id=GIT_AUTH_TOKEN \ gh_auth="$(cat /run/secrets/GIT_AUTH_TOKEN || true)@" && \ curl -fLsS -o requirements/edx/development.txt https://${gh_auth}raw.githubusercontent.com/${EDX_PLATFORM_REPO}/${EDX_PLATFORM_VERSION}/requirements/edx/development.txt +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/edx/development.txt diff --git a/dockerfiles/portal-designer.Dockerfile b/dockerfiles/portal-designer.Dockerfile index 24f1aae..98505b2 100644 --- a/dockerfiles/portal-designer.Dockerfile +++ b/dockerfiles/portal-designer.Dockerfile @@ -64,6 +64,8 @@ RUN virtualenv -p python${PYTHON_VERSION} --always-copy ${DESIGNER_VENV_DIR} # Download and install application requirements RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/portal-designer/master/requirements/production.txt +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/production.txt RUN mkdir -p /edx/var/log @@ -82,5 +84,7 @@ CMD gunicorn --workers=2 --name designer -c /edx/app/designer/designer/docker_gu FROM app AS devstack # Install dependencies as root and revert back to application user USER root +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r /edx/app/designer/requirements/dev.txt USER app diff --git a/dockerfiles/xqueue.Dockerfile b/dockerfiles/xqueue.Dockerfile index 016c044..69da503 100644 --- a/dockerfiles/xqueue.Dockerfile +++ b/dockerfiles/xqueue.Dockerfile @@ -61,6 +61,8 @@ FROM app AS dev RUN curl -L -o ${XQUEUE_CODE_DIR}/requirements/dev.txt https://raw.githubusercontent.com/openedx/xqueue/master/requirements/dev.txt # xqueue service config commands below +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r ${XQUEUE_CODE_DIR}/requirements/dev.txt # cloning git repo @@ -76,6 +78,8 @@ FROM app AS production RUN curl -L -o ${XQUEUE_APP_DIR}/requirements.txt https://raw.githubusercontent.com/openedx/xqueue/master/requirements.txt # xqueue service config commands below +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r ${XQUEUE_APP_DIR}/requirements.txt # cloning git repo From ba4fefd857fe36a465b1168ef738938b28b87b5f Mon Sep 17 00:00:00 2001 From: Kira Miller <31229189+kiram15@users.noreply.github.com> Date: Thu, 19 Feb 2026 04:24:58 +0000 Subject: [PATCH 2/6] fix: adding changes from focal to jammy --- dockerfiles/edx-exams.Dockerfile | 2 +- dockerfiles/edx-notes-api.Dockerfile | 2 +- dockerfiles/enterprise-access.Dockerfile | 4 ++++ dockerfiles/enterprise-subsidy.Dockerfile | 4 ++++ dockerfiles/portal-designer.Dockerfile | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dockerfiles/edx-exams.Dockerfile b/dockerfiles/edx-exams.Dockerfile index 2c2e2c9..e75e748 100644 --- a/dockerfiles/edx-exams.Dockerfile +++ b/dockerfiles/edx-exams.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal AS app +FROM ubuntu:jammy AS app LABEL org.opencontainers.image.authors="sre@edx.org" diff --git a/dockerfiles/edx-notes-api.Dockerfile b/dockerfiles/edx-notes-api.Dockerfile index 32ddcd8..d82f461 100644 --- a/dockerfiles/edx-notes-api.Dockerfile +++ b/dockerfiles/edx-notes-api.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal AS app +FROM ubuntu:jammy AS app # Packages installed: # git; Used to pull in particular requirements from github rather than pypi, diff --git a/dockerfiles/enterprise-access.Dockerfile b/dockerfiles/enterprise-access.Dockerfile index 8dacd81..51fef3b 100644 --- a/dockerfiles/enterprise-access.Dockerfile +++ b/dockerfiles/enterprise-access.Dockerfile @@ -96,6 +96,8 @@ RUN mkdir -p requirements RUN curl -L -o requirements/pip.txt https://raw.githubusercontent.com/edx/enterprise-access/main/requirements/pip.txt RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/enterprise-access/main/requirements/production.txt # Dependencies are installed as root so they cannot be modified by the application user. +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/pip.txt RUN pip install -r requirements/production.txt @@ -112,6 +114,8 @@ CMD gunicorn --workers=2 --name enterprise-access -c /edx/app/enterprise-access/ FROM app AS devstack USER root +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/dev.txt CMD gunicorn --workers=2 --name enterprise-access -c /edx/app/enterprise-access/enterprise_access/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_access.wsgi:application diff --git a/dockerfiles/enterprise-subsidy.Dockerfile b/dockerfiles/enterprise-subsidy.Dockerfile index a674b57..19bb5a8 100644 --- a/dockerfiles/enterprise-subsidy.Dockerfile +++ b/dockerfiles/enterprise-subsidy.Dockerfile @@ -85,6 +85,8 @@ RUN mkdir -p requirements RUN curl -L -o requirements/pip.txt https://raw.githubusercontent.com/edx/enterprise-subsidy/main/requirements/pip.txt RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/enterprise-subsidy/main/requirements/production.txt +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/pip.txt RUN pip install -r requirements/production.txt @@ -102,6 +104,8 @@ CMD gunicorn --workers=2 --name enterprise-subsidy -c /edx/app/enterprise-subsid FROM app AS devstack USER root +# Pin setuptools to avoid pkg_resources removal issue +RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/dev.txt USER app CMD gunicorn --workers=2 --name enterprise-subsidy -c /edx/app/enterprise-subsidy/enterprise_subsidy/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_subsidy.wsgi:application diff --git a/dockerfiles/portal-designer.Dockerfile b/dockerfiles/portal-designer.Dockerfile index 98505b2..7c2d0bb 100644 --- a/dockerfiles/portal-designer.Dockerfile +++ b/dockerfiles/portal-designer.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal AS app +FROM ubuntu:jammy AS app MAINTAINER sre@edx.org # ENV variables for Python 3.12 support From e1a00a03effc8d57399366c5521a58edc784b5d3 Mon Sep 17 00:00:00 2001 From: Kira Miller <31229189+kiram15@users.noreply.github.com> Date: Thu, 19 Feb 2026 04:36:09 +0000 Subject: [PATCH 3/6] fix: copilot comments --- dockerfiles/portal-designer.Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/dockerfiles/portal-designer.Dockerfile b/dockerfiles/portal-designer.Dockerfile index 7c2d0bb..11bf411 100644 --- a/dockerfiles/portal-designer.Dockerfile +++ b/dockerfiles/portal-designer.Dockerfile @@ -30,7 +30,6 @@ RUN apt-get update && apt-get -qy install --no-install-recommends \ python${PYTHON_VERSION} \ python${PYTHON_VERSION}-dev -RUN pip install --upgrade pip setuptools # delete apt package lists because we do not need them inflating our image RUN rm -rf /var/lib/apt/lists/* From 6eb7c5b786cddd65f0792e15f4a80e9c10704a90 Mon Sep 17 00:00:00 2001 From: Kira Miller <31229189+kiram15@users.noreply.github.com> Date: Mon, 23 Feb 2026 07:37:32 +0000 Subject: [PATCH 4/6] fix: removing non-enterprise ones --- dockerfiles/course-discovery.Dockerfile | 4 ---- dockerfiles/ecommerce.Dockerfile | 4 ---- dockerfiles/edx-exams.Dockerfile | 6 +----- dockerfiles/edx-notes-api.Dockerfile | 4 +--- dockerfiles/edx-platform.Dockerfile | 4 ---- dockerfiles/enterprise-access.Dockerfile | 3 +-- dockerfiles/portal-designer.Dockerfile | 7 ++----- dockerfiles/xqueue.Dockerfile | 4 ---- 8 files changed, 5 insertions(+), 31 deletions(-) diff --git a/dockerfiles/course-discovery.Dockerfile b/dockerfiles/course-discovery.Dockerfile index 6478d5d..b427be4 100644 --- a/dockerfiles/course-discovery.Dockerfile +++ b/dockerfiles/course-discovery.Dockerfile @@ -81,8 +81,6 @@ ARG OPENEDX_TRANSLATIONS_REPO ENV DJANGO_SETTINGS_MODULE="course_discovery.settings.production" ENV ATLAS_OPTIONS="--repository=$OPENEDX_TRANSLATIONS_REPO" -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r ${DISCOVERY_CODE_DIR}/requirements/production.txt RUN DISCOVERY_CFG=minimal.yml OPENEDX_ATLAS_PULL=true make pull_translations @@ -98,8 +96,6 @@ RUN curl -L -o ${DISCOVERY_CODE_DIR}/course_discovery/settings/devstack.py https ENV DJANGO_SETTINGS_MODULE="course_discovery.settings.devstack" ENV ATLAS_OPTIONS="--repository=$OPENEDX_TRANSLATIONS_REPO" -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r ${DISCOVERY_CODE_DIR}/requirements/django.txt RUN pip install -r ${DISCOVERY_CODE_DIR}/requirements/local.txt diff --git a/dockerfiles/ecommerce.Dockerfile b/dockerfiles/ecommerce.Dockerfile index b84f824..8ba70dd 100644 --- a/dockerfiles/ecommerce.Dockerfile +++ b/dockerfiles/ecommerce.Dockerfile @@ -62,8 +62,6 @@ ENV DJANGO_SETTINGS_MODULE "ecommerce.settings.production" RUN mkdir requirements RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/ecommerce/2u/main/requirements/production.txt -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r ${ECOMMERCE_CODE_DIR}/requirements/production.txt # Copy over rest of code. @@ -80,8 +78,6 @@ ENV DJANGO_SETTINGS_MODULE "ecommerce.settings.devstack" RUN mkdir requirements RUN curl -L -o requirements/dev.txt https://raw.githubusercontent.com/edx/ecommerce/2u/main/requirements/dev.txt -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r ${ECOMMERCE_CODE_DIR}/requirements/dev.txt # Devstack related step for backwards compatibility diff --git a/dockerfiles/edx-exams.Dockerfile b/dockerfiles/edx-exams.Dockerfile index e75e748..d1c0bf6 100644 --- a/dockerfiles/edx-exams.Dockerfile +++ b/dockerfiles/edx-exams.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:jammy AS app +FROM ubuntu:focal AS app LABEL org.opencontainers.image.authors="sre@edx.org" @@ -84,8 +84,6 @@ RUN mkdir -p requirements # this prevents the image cache from busting unless the dependencies have changed. RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/edx-exams/main/requirements/production.txt -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" # Dependencies are installed as root so they cannot be modified by the application user. RUN pip install -r requirements/production.txt @@ -99,8 +97,6 @@ FROM app as devstack ENV DJANGO_SETTINGS_MODULE edx_exams.settings.devstack -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/dev.txt CMD while true; do python ./manage.py runserver 0.0.0.0:18740; sleep 2; done diff --git a/dockerfiles/edx-notes-api.Dockerfile b/dockerfiles/edx-notes-api.Dockerfile index d82f461..52cace9 100644 --- a/dockerfiles/edx-notes-api.Dockerfile +++ b/dockerfiles/edx-notes-api.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:jammy AS app +FROM ubuntu:focal AS app # Packages installed: # git; Used to pull in particular requirements from github rather than pypi, @@ -79,8 +79,6 @@ RUN pip install --upgrade pip setuptools RUN curl -L -o requirements/base.txt https://raw.githubusercontent.com/openedx/edx-notes-api/master/requirements/base.txt RUN curl -L -o requirements/pip.txt https://raw.githubusercontent.com/openedx/edx-notes-api/master/requirements/pip.txt -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install --no-cache-dir -r requirements/base.txt RUN pip install --no-cache-dir -r requirements/pip.txt diff --git a/dockerfiles/edx-platform.Dockerfile b/dockerfiles/edx-platform.Dockerfile index 10da4fd..1e07f62 100644 --- a/dockerfiles/edx-platform.Dockerfile +++ b/dockerfiles/edx-platform.Dockerfile @@ -207,8 +207,6 @@ RUN --mount=type=secret,id=GIT_AUTH_TOKEN \ curl -fLsS -o requirements/edx/assets.txt https://${gh_auth}raw.githubusercontent.com/${EDX_PLATFORM_REPO}/${EDX_PLATFORM_VERSION}/requirements/edx/assets.txt RUN pip install -r requirements/pip.txt -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/edx/base.txt RUN pip install -r requirements/edx/assets.txt @@ -243,8 +241,6 @@ RUN --mount=type=secret,id=GIT_AUTH_TOKEN \ gh_auth="$(cat /run/secrets/GIT_AUTH_TOKEN || true)@" && \ curl -fLsS -o requirements/edx/development.txt https://${gh_auth}raw.githubusercontent.com/${EDX_PLATFORM_REPO}/${EDX_PLATFORM_VERSION}/requirements/edx/development.txt -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/edx/development.txt diff --git a/dockerfiles/enterprise-access.Dockerfile b/dockerfiles/enterprise-access.Dockerfile index 51fef3b..cf9466f 100644 --- a/dockerfiles/enterprise-access.Dockerfile +++ b/dockerfiles/enterprise-access.Dockerfile @@ -57,8 +57,6 @@ RUN apt-get update && apt-get -qy install --no-install-recommends \ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN pip install --upgrade pip setuptools - # Remove package lists to reduce image size RUN rm -rf /var/lib/apt/lists/* @@ -98,6 +96,7 @@ RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx # Dependencies are installed as root so they cannot be modified by the application user. # Pin setuptools to avoid pkg_resources removal issue RUN pip install "setuptools<82.0.0" +RUN pip install --upgrade pip setuptools RUN pip install -r requirements/pip.txt RUN pip install -r requirements/production.txt diff --git a/dockerfiles/portal-designer.Dockerfile b/dockerfiles/portal-designer.Dockerfile index 11bf411..24f1aae 100644 --- a/dockerfiles/portal-designer.Dockerfile +++ b/dockerfiles/portal-designer.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:jammy AS app +FROM ubuntu:focal AS app MAINTAINER sre@edx.org # ENV variables for Python 3.12 support @@ -30,6 +30,7 @@ RUN apt-get update && apt-get -qy install --no-install-recommends \ python${PYTHON_VERSION} \ python${PYTHON_VERSION}-dev +RUN pip install --upgrade pip setuptools # delete apt package lists because we do not need them inflating our image RUN rm -rf /var/lib/apt/lists/* @@ -63,8 +64,6 @@ RUN virtualenv -p python${PYTHON_VERSION} --always-copy ${DESIGNER_VENV_DIR} # Download and install application requirements RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/portal-designer/master/requirements/production.txt -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r requirements/production.txt RUN mkdir -p /edx/var/log @@ -83,7 +82,5 @@ CMD gunicorn --workers=2 --name designer -c /edx/app/designer/designer/docker_gu FROM app AS devstack # Install dependencies as root and revert back to application user USER root -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r /edx/app/designer/requirements/dev.txt USER app diff --git a/dockerfiles/xqueue.Dockerfile b/dockerfiles/xqueue.Dockerfile index 69da503..016c044 100644 --- a/dockerfiles/xqueue.Dockerfile +++ b/dockerfiles/xqueue.Dockerfile @@ -61,8 +61,6 @@ FROM app AS dev RUN curl -L -o ${XQUEUE_CODE_DIR}/requirements/dev.txt https://raw.githubusercontent.com/openedx/xqueue/master/requirements/dev.txt # xqueue service config commands below -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r ${XQUEUE_CODE_DIR}/requirements/dev.txt # cloning git repo @@ -78,8 +76,6 @@ FROM app AS production RUN curl -L -o ${XQUEUE_APP_DIR}/requirements.txt https://raw.githubusercontent.com/openedx/xqueue/master/requirements.txt # xqueue service config commands below -# Pin setuptools to avoid pkg_resources removal issue -RUN pip install "setuptools<82.0.0" RUN pip install -r ${XQUEUE_APP_DIR}/requirements.txt # cloning git repo From 70058894431560279eacca8bb8b99f5356bb70c5 Mon Sep 17 00:00:00 2001 From: Kira Miller <31229189+kiram15@users.noreply.github.com> Date: Tue, 24 Feb 2026 06:38:14 +0000 Subject: [PATCH 5/6] fix: PR review --- dockerfiles/enterprise-access.Dockerfile | 11 +++-------- dockerfiles/enterprise-subsidy.Dockerfile | 10 +++------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/dockerfiles/enterprise-access.Dockerfile b/dockerfiles/enterprise-access.Dockerfile index cf9466f..fbe1ebf 100644 --- a/dockerfiles/enterprise-access.Dockerfile +++ b/dockerfiles/enterprise-access.Dockerfile @@ -51,22 +51,18 @@ RUN apt-get update && apt-get -qy install --no-install-recommends \ curl \ libffi-dev \ libsqlite3-dev \ - python3-pip \ python${PYTHON_VERSION} \ - python${PYTHON_VERSION}-dev + python${PYTHON_VERSION}-dev \ + python${PYTHON_VERSION}-venv RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Remove package lists to reduce image size RUN rm -rf /var/lib/apt/lists/* -# Set up Python environment and install virtualenv -RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} -RUN pip install virtualenv - # Create a virtualenv for sanity ENV VIRTUAL_ENV=/edx/venvs/enterprise-access -RUN virtualenv -p python${PYTHON_VERSION} $VIRTUAL_ENV +RUN python${PYTHON_VERSION} -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" WORKDIR /tmp @@ -96,7 +92,6 @@ RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx # Dependencies are installed as root so they cannot be modified by the application user. # Pin setuptools to avoid pkg_resources removal issue RUN pip install "setuptools<82.0.0" -RUN pip install --upgrade pip setuptools RUN pip install -r requirements/pip.txt RUN pip install -r requirements/production.txt diff --git a/dockerfiles/enterprise-subsidy.Dockerfile b/dockerfiles/enterprise-subsidy.Dockerfile index 19bb5a8..b64eb2b 100644 --- a/dockerfiles/enterprise-subsidy.Dockerfile +++ b/dockerfiles/enterprise-subsidy.Dockerfile @@ -51,22 +51,18 @@ RUN apt-get update && apt-get -qy install --no-install-recommends \ curl \ libffi-dev \ libsqlite3-dev \ - python3-pip \ python${PYTHON_VERSION} \ - python${PYTHON_VERSION}-dev + python${PYTHON_VERSION}-dev \ + python${PYTHON_VERSION}-venv RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # delete apt package lists because we do not need them inflating our image RUN rm -rf /var/lib/apt/lists/* -# need to use virtualenv pypi package with Python 3.12 -RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} -RUN pip install virtualenv - # Create a virtualenv for sanity ENV VIRTUAL_ENV=/edx/venvs/enterprise-subsidy -RUN virtualenv -p python${PYTHON_VERSION} $VIRTUAL_ENV +RUN python${PYTHON_VERSION} -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" RUN locale-gen en_US.UTF-8 From c696cb57263c7d982ff8d7203e5f4c426c09ced2 Mon Sep 17 00:00:00 2001 From: Kira Miller <31229189+kiram15@users.noreply.github.com> Date: Wed, 25 Feb 2026 22:32:56 +0000 Subject: [PATCH 6/6] fix: PR request --- dockerfiles/enterprise-access.Dockerfile | 2 -- dockerfiles/enterprise-subsidy.Dockerfile | 2 -- 2 files changed, 4 deletions(-) diff --git a/dockerfiles/enterprise-access.Dockerfile b/dockerfiles/enterprise-access.Dockerfile index fbe1ebf..6c87518 100644 --- a/dockerfiles/enterprise-access.Dockerfile +++ b/dockerfiles/enterprise-access.Dockerfile @@ -13,8 +13,6 @@ MAINTAINER sre@edx.org # python; ubuntu doesnt ship with python, so this is the python we will use to run the application -# python3-pip; install pip to install application requirements.txt files - # pkg-config # mysqlclient>=2.2.0 requires this (https://github.com/PyMySQL/mysqlclient/issues/620) diff --git a/dockerfiles/enterprise-subsidy.Dockerfile b/dockerfiles/enterprise-subsidy.Dockerfile index b64eb2b..a3bddb1 100644 --- a/dockerfiles/enterprise-subsidy.Dockerfile +++ b/dockerfiles/enterprise-subsidy.Dockerfile @@ -8,8 +8,6 @@ MAINTAINER sre@edx.org # python; ubuntu doesnt ship with python, so this is the python we will use to run the application -# python3-pip; install pip to install application requirements.txt files - # pkg-config # mysqlclient>=2.2.0 requires this (https://github.com/PyMySQL/mysqlclient/issues/620)