File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -79,17 +79,17 @@ WORKDIR /deep_ros_ws
7979# ===============================================
8080# Add User Configuration
8181# ===============================================
82- FROM dev-tools AS user-conf
82+ FROM dev-tools as user-conf
8383ARG USERNAME
84+ ARG USER_GID
85+ ARG USER_UID
8486ARG ROS_DISTRO
8587
8688# Cater image to user
8789SHELL ["/bin/bash" , "-c" ]
88- COPY .env /tmp/.env
8990# hadolint ignore=SC2086
90- RUN source /tmp/.env && rm /tmp/.env \
91- && groupadd --gid $USER_GID $USERNAME \
92- && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME --shell /bin/bash \
91+ RUN groupadd --gid ${USER_GID} ${USERNAME} \
92+ && useradd --uid ${USER_UID} --gid ${USER_GID} -m $USERNAME --shell /bin/bash \
9393 && apt-get update \
9494 && apt-get install -y --no-install-recommends sudo \
9595 && echo $USERNAME ALL=\( ALL\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
@@ -104,3 +104,4 @@ USER $USERNAME
104104
105105# Source ROS in user's bashrc
106106RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/$USERNAME/.bashrc
107+
You can’t perform that action at this time.
0 commit comments