Skip to content

Commit

Permalink
fix: large id causes large dev image size
Browse files Browse the repository at this point in the history
There is an old bug on docker, which having a large user id will cause hang/crash on build level. --no-log-init added to the useradd command, such that the /var/log/faillog does not take much space.
The upstream issue: moby/moby#5419
  • Loading branch information
CodeWithEmad committed Oct 10, 2023
1 parent 0a73b88 commit f8aff20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tutor/templates/build/openedx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f8aff20

Please sign in to comment.