From cebc67ce175740fab6ec8b1fc69e4d72a299c3a6 Mon Sep 17 00:00:00 2001 From: Griswald Brooks Date: Wed, 31 Jan 2024 16:58:53 -0500 Subject: [PATCH] Fix development container user for systems where the UID and GID do not match --- .devcontainer/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index a37b25a..e96bf61 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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 \