diff --git a/changelog.d/20241010_122752_dawoud.sheraz_ubuntu_upgrade.md b/changelog.d/20241010_122752_dawoud.sheraz_ubuntu_upgrade.md index 9d35248c52..7578c9372b 100644 --- a/changelog.d/20241010_122752_dawoud.sheraz_ubuntu_upgrade.md +++ b/changelog.d/20241010_122752_dawoud.sheraz_ubuntu_upgrade.md @@ -1,3 +1,2 @@ - 💥[Feature] Update Open edX Image to use Ubuntu 24.04 as base OS. (by @dawoudsheraz) - - Change APP_USER_ID to 1001 as UID 1000 is now shipped by default - Adds xmlsec related dependencies to fix xmlsec import issues during translations build diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index bf0e43c2a0..e033364324 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -4,6 +4,10 @@ FROM docker.io/ubuntu:24.04 AS minimal LABEL maintainer="Overhang.io " ENV DEBIAN_FRONTEND=noninteractive + +# Delete default UID=1000 `ubuntu` user to ensure we can use id 1000 for app user +RUN userdel -r ubuntu + RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt update && \ @@ -144,7 +148,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ # From then on, run as unprivileged "app" user # Note that this must always be different from root (APP_USER_ID=0) -ARG APP_USER_ID=1001 +ARG APP_USER_ID=1000 RUN if [ "$APP_USER_ID" = 0 ]; then echo "app user may not be root" && false; fi RUN useradd --no-log-init --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app USER ${APP_USER_ID}