Remove the ubuntu user from the base image.

This commit is contained in:
James Pace 2024-09-15 10:03:10 -04:00
parent 8b7bf6cc96
commit 0e9f28cdba
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ RUN apt update -y && \
# Set up user.
# Touch file in home directory so we don't get bothered first call to sudo
RUN useradd -m -G sudo -s /bin/bash -u 1000 j7s && \
RUN userdel -r ubuntu && \
useradd -m -G sudo -s /bin/bash -u 1000 j7s && \
bash -c 'echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/container' && \
chmod 0440 /etc/sudoers.d/container && \
touch /home/j7s/.sudo_as_admin_successful