From 52cae98705e5b8d60f07f99da0007b8f2e73a8fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Sandstr=C3=B6m?= Date: Mon, 21 Sep 2020 10:58:24 +0200 Subject: [PATCH] fix: add no log init flag to useradd (#4379) This commit fixes an error where the underlaying disk would get filled up when running make test-tools-image and the user running it are running with a big UID. Adding --no-log-init or -l will prevent useradd from trying to make sure that there are is room for the user in lastlog and faillog. --- test/container/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/container/Dockerfile b/test/container/Dockerfile index 5dcc95820d..302f6e5f48 100644 --- a/test/container/Dockerfile +++ b/test/container/Dockerfile @@ -74,7 +74,7 @@ COPY ./test/container/uid_entrypoint.sh /usr/local/bin ARG UID # Prepare user configuration & build environments -RUN useradd -u ${UID} -d /home/user -s /bin/bash user && \ +RUN useradd -l -u ${UID} -d /home/user -s /bin/bash user && \ echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/user && \ HELM_HOME=/home/user/.helm helm2 init --client-only && \ HOME=/home/user git config --global user.name "ArgoCD Test User" && \ @@ -98,4 +98,4 @@ RUN useradd -u ${UID} -d /home/user -s /bin/bash user && \ ln -s /opt/yarn-v1.15.2/bin/yarn /usr/local/bin/yarn && \ ln -s /opt/yarn-v1.15.2/bin/yarnpkg /usr/local/bin/yarnpkg -ENTRYPOINT ["/usr/local/bin/uid_entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/uid_entrypoint.sh"]