Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

Commit

Permalink
add user to sudoers and rename it to devadmin
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Langenbacher authored and clangenb committed May 31, 2021
1 parent 8c29807 commit e784f10
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@ RUN apt-get update && \
ARG USER_ID
ARG GROUP_ID

RUN addgroup --gid $GROUP_ID user
RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user
USER user
RUN addgroup --gid $GROUP_ID devadmin
RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID devadmin
# make add user to sudoer
RUN adduser devadmin sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER devadmin

# install rust as the current user
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Expand Down

0 comments on commit e784f10

Please sign in to comment.