diff --git a/Dockerfile b/Dockerfile index 37c32aa98a475..c639b70e5b4a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,10 +47,9 @@ RUN apt-get update \ && apt-get remove --purge -y software-properties-common \ && apt-get autoremove --purge -y \ && rm -rf /var/lib/apt/lists/* \ - && sed -i -E '/^session optional\s+pam_umask\.so$/ s/$/ umask=0022/' /etc/pam.d/common-session \ - && sed -i -E '/^session optional\s+pam_umask\.so$/ s/$/ umask=0022/' /etc/pam.d/common-session-noninteractive \ + && sed -i -E 's/^(USERGROUPS_ENAB\s+)yes$/\1no/' /etc/login.defs \ && localedef -i en_US -f UTF-8 en_US.UTF-8 \ - && useradd -m -s /bin/bash linuxbrew \ + && useradd --create-home --shell /bin/bash --user-group linuxbrew \ && echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers \ && su - linuxbrew -c 'mkdir ~/.linuxbrew'