adduser: useradd --no-log-init to reduce lastlog size

If the Docker host does not support sparse files /var/log/lastlog can be extremely large if a large UID is set. --no-log-init prevents lastlog being created.
pull/804/head
Simon Li 2019-10-05 23:45:12 +01:00
rodzic 11fc69f8d6
commit 91b7d752b6
1 zmienionych plików z 11 dodań i 4 usunięć

Wyświetl plik

@ -42,10 +42,17 @@ ARG NB_UID
ENV USER ${NB_USER}
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
RUN groupadd \
--gid ${NB_UID} \
${NB_USER} &&
useradd \
--comment "Default user" \
--create-home \
--gid ${NB_UID} \
--no-log-init \
--shell /bin/bash \
--uid ${NB_UID} \
${NB_USER}
RUN wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
DISTRO="bionic" && \