Skip to content

Commit

Permalink
Run useradd if ubuntu user is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jun 3, 2024
1 parent d93fd58 commit 0c9226a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ RUN set -ex && \
apt-get clean && rm -r /var/lib/apt/lists/*

RUN set -ex && \
useradd -ms /bin/bash ubuntu
if ! (id ubuntu &>/dev/null); then \
useradd -ms /bin/bash ubuntu; \
fi

RUN mkdir -p /usr/local/etc

Expand Down

0 comments on commit 0c9226a

Please sign in to comment.