diff --git a/changelog.d/20231011_005657_codewithemad_large_dev_image.md b/changelog.d/20231011_005657_codewithemad_large_dev_image.md new file mode 100644 index 0000000..efb1fd6 --- /dev/null +++ b/changelog.d/20231011_005657_codewithemad_large_dev_image.md @@ -0,0 +1 @@ +- [Improvement] No more large dev images. This was fixed by adding --no-log-init option to useradd command and reducing space usage of /var/log/faillog. (by @CodeWithEmad) \ No newline at end of file diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 6027eac..7c41bf9 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -149,7 +149,7 @@ RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,shari # Note that this must always be different from root (APP_USER_ID=0) ARG APP_USER_ID=1000 RUN if [ "$APP_USER_ID" = 0 ]; then echo "app user may not be root" && false; fi -RUN useradd --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app +RUN useradd --no-log-init --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app USER ${APP_USER_ID} # https://hub.docker.com/r/powerman/dockerize/tags