From 85f2b46d3cc505bbf3562123ddd1f9e65f00e11e Mon Sep 17 00:00:00 2001 From: Griswald Brooks Date: Wed, 31 Jan 2024 17:00:59 -0500 Subject: [PATCH] Fix UID/GID for container user --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 466b6af..98d239f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -87,12 +87,12 @@ RUN python3 -m pip install --no-cache-dir \ # Setup user home directory # --no-log-init helps with excessively long UIDs RUN groupadd --gid $GID $USER \ - && useradd --no-log-init --uid $GID --gid $UID -m $USER --groups sudo \ + && useradd --no-log-init --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} USER $USER ENV SHELL /bin/bash