123456789101112131415161718192021222324252627 |
- FROM ros:galactic-ros-base-focal
- ARG ROS_DISTRO=galactic
- # Setup user account
- ARG uid=1000
- ARG gid=1000
- ARG user=jasper
- RUN groupadd -r -f -g ${gid} ${user} && useradd -o -r -l -u ${uid} -g ${gid} -ms /bin/bash ${user}
- RUN usermod -aG sudo ${user}
- RUN echo "${user}:888888" | chpasswd
- # [Optional] Add sudo support. Omit if you don't need to install software after connecting.
- RUN sed -i 's/http:\/\/archive.ubuntu.com\//http:\/\/mirrors.aliyun.com\//g' /etc/apt/sources.list \
- && apt-get update && apt-get install -y --no-install-recommends sudo \
- libc-bin \
- binutils
- # ********************************************************
- # * Anything else you want to do like clean up goes here *
- # ********************************************************
- RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/jasper/.bashrc \
- && echo "export TERM=xterm-256color" >> /home/jasper/.bashrc
- # [Optional] Set the default user. Omit if you want to keep the default as root.
- USER $user
- CMD ["/bin/bash"]
|