Skip to content

Commit

Permalink
Remove deafult user by user id not by name
Browse files Browse the repository at this point in the history
  • Loading branch information
Wiktor-99 committed Sep 14, 2024
1 parent 44ad190 commit 28189fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ ARG USER_UID=1000
ARG USER_GID=$USER_UID

ENV DEBIAN_FRONTEND=noninteractive
RUN deluser ubuntu && groupadd --gid $USER_GID $USERNAME \
RUN userdel $(getent passwd 1000 | cut -d: -f1)
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& apt-get update \
&& apt-get install -y sudo \
Expand Down

0 comments on commit 28189fd

Please sign in to comment.