Best practice for the correct user setup within a ROS docker container?
docker ros states: By default, the container runs as the root user
http://wiki.ros.org/rosdep states: Do NOT run rosdep update with sudo. It is not required and will result in permission errors later on.
Trying to follow http://docs.ros.org/melodic/api/movei..., running in osrf/ros:melodic-desktop-full
I am getting to Warning: running 'rosdep update' as root is not recommended.
as below
Is there a recommended best practice for the correct user setup within a ROS docker container?
docker run -it -v ~/catkin_wses:/root osrf/ros:melodic-desktop-full
root@0ebd9e5101b5:/# cd /root/ws_moveit-tuts/src/
root@0ebd9e5101b5:~/ws_moveit-tuts/src# rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d Warning: running 'rosdep update' as root is not recommended.
On the same topic, is it possible to init and update rosdep at the creation of the docker so it is available and ready for the user (regular account) ? I can do it but then the user has to use sudo before for intance 'rosdep install'. Anyway to do it without sudo, i.e. init and update rosdep in the Dockerfile as a regular user ?