Skip to content

Commit

Permalink
Added haskell user for use with vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-ch authored Dec 23, 2023
1 parent 019ee60 commit 8c28e8f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ RUN \
ghcup install hls

ARG USER_NAME=haskell
RUN useradd --no-log-init --create-home --shell /bin/bash ${USER_NAME}
WORKDIR /home/${USER_NAME}
ARG USER_UID=1000
ARG USER_GID=$USER_UID

USER ${USER_NAME}
# Create the user
RUN groupadd --gid $USER_GID $USER_NAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USER_NAME \
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& apt-get install -y sudo \
&& echo $USER_NAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USER_NAME \
&& chmod 0440 /etc/sudoers.d/$USER_NAME

USER $USER_NAME

0 comments on commit 8c28e8f

Please sign in to comment.