Skip to content

Commit

Permalink
Add gitpod user in Alpine image
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxinyu95 committed Feb 20, 2024
1 parent b8fa660 commit 08ebd73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .docker/gitpod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ USER root

# Add additional pkgs to https://github.com/xu-cheng/latex-docker/blob/master/setup.sh

RUN apk add \
RUN apk add --no-cache \
font-noto-cjk ttf-freefont \
bash-completion sudo \
rm -rf /tmp/*

RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \
# passwordless sudo for users in the 'sudo' group
&& sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
# Add gitpod user
RUN echo '%gitpod ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/gitpod \
&& addgroup -g 33333 gitpod && adduser -u 33333 -G gitpod -h /home/gitpod -s /bin/bash -D gitpod

USER gitpod
WORKDIR /home/gitpod
Expand Down

0 comments on commit 08ebd73

Please sign in to comment.