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.
This commit is contained in:
Johan Sandström 2020-09-21 10:58:24 +02:00 committed by GitHub
parent 3850e80040
commit 52cae98705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"]
ENTRYPOINT ["/usr/local/bin/uid_entrypoint.sh"]