mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-04 19:03:39 +00:00
fix: 600GB openedx-dev image on macOS
On macOS, building the "openedx-dev" Docker image resulted in an image that required more than 600 GB of disk space. This was due to the `adduser` command which was called with a user ID of 2x10⁹ (on macOS only). This resulted in a very large /var/log/faillog file, hence the image size. Related upstream discussion: https://github.com/moby/moby/issues/5419 Close https://github.com/openedx/wg-developer-experience/issues/178
This commit is contained in:
parent
0a73b8857d
commit
f4dc508c19
@ -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)
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user