diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3c51393..1e43b90 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -71,15 +71,15 @@ WORKDIR /deep_ros_ws # =============================================== FROM dev-tools as user-conf ARG USERNAME +ARG USER_GID +ARG USER_UID ARG ROS_DISTRO # Cater image to user SHELL ["/bin/bash", "-c"] -COPY .env /tmp/.env # hadolint ignore=SC2086 -RUN source /tmp/.env && rm /tmp/.env \ - && groupadd --gid $USER_GID $USERNAME \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME --shell /bin/bash \ +RUN groupadd --gid ${USER_GID} ${USERNAME} \ + && useradd --uid ${USER_UID} --gid ${USER_GID} -m $USERNAME --shell /bin/bash \ && apt-get update \ && apt-get install -y --no-install-recommends sudo \ && echo $USERNAME ALL=\(ALL\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \