Skip to content

Commit

Permalink
Fix development container user for systems where the UID and GID do n…
Browse files Browse the repository at this point in the history
…ot match
  • Loading branch information
griswaldbrooks authored and ChrisThrasher committed Feb 1, 2024
1 parent c582b49 commit cebc67c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ ARG GID=$UID

# Setup user home directory
RUN groupadd --gid $GID $USER \
&& useradd --uid $GID --gid $UID -m $USER --groups sudo \
&& useradd --uid $UID --gid $GID -m $USER --groups sudo \
&& echo $USER ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USER \
&& chmod 0440 /etc/sudoers.d/$USER \
&& echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/${USER}/.profile \
&& touch /home/${USER}/.bashrc \
&& chown -R ${GID}:${UID} /home/${USER}
&& chown -R ${UID}:${GID} /home/${USER}

# install pre-commit
RUN python3 -m pip install -U \
Expand Down

0 comments on commit cebc67c

Please sign in to comment.