Skip to content

Commit

Permalink
set user dave
Browse files Browse the repository at this point in the history
  • Loading branch information
woensug-choi committed Jun 5, 2024
1 parent 0eb057e commit dead9db
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
16 changes: 15 additions & 1 deletion .docker/jazzy.amd64.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@ ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\
extras/ros-jazzy-gz-harmonic-install.sh install.sh
RUN bash install.sh

ENV ROS_UNDERLAY /root/ws_dave/install
# Make user (assume host user has 1000:1000 permission)
ARG USER=dave
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN addgroup --gid 1000 $USER && \
adduser --uid 1000 --ingroup $USER --shell /bin/bash --disabled-password --gecos '' $USER \
&& echo "$USER:$USER" | chpasswd && adduser $USER sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Set User as user
USER $USER

# RUN adduser --shell /bin/bash --disabled-password --gecos "" user \
# && echo 'user:user' | chpasswd && adduser user sudo \
# && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

ENV ROS_UNDERLAY ~/home/$USER/ws_dave/install
WORKDIR $ROS_UNDERLAY/../src

ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\
Expand Down
9 changes: 6 additions & 3 deletions .docker/jazzy.arm64v8.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ARG ROS_DISTRO="jazzy"

EXPOSE 3389/tcp
# EXPOSE 22/tcp
ARG USER=ioes
ARG PASS=ioes
ARG USER=dave
ARG PASS=dave
ARG X11Forwarding=false

# Set RDP and SSH environments
Expand Down Expand Up @@ -86,7 +86,7 @@ ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\
extras/ros-jazzy-gz-harmonic-install.sh install.sh
RUN bash install.sh

ENV ROS_UNDERLAY /root/ws_dave/install
ENV ROS_UNDERLAY /home/$USER/dave_ws/install
WORKDIR $ROS_UNDERLAY/../src

ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\
Expand All @@ -108,5 +108,8 @@ RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" && \
RUN sed --in-place --expression \
'$i source "$ROS_UNDERLAY/setup.bash"' /ros_entrypoint.sh

# Set User as user
USER $USER

# Use software rendering for container
ENV LIBGL_ALWAYS_INDIRECT=1

0 comments on commit dead9db

Please sign in to comment.