Newer
Older
turtlebot3_noetic / Dockerfile
@ikko ikko on 23 Sep 2021 3 KB Update Dockerfile
  1. FROM tiryoh/ros-desktop-vnc:noetic
  2.  
  3. ENV DEBCONF_NOWARNINGS=yes
  4. ENV DEBIAN_FRONTEND noninteractive
  5. ENV ROS_PYTHON_VERSION 3
  6. SHELL ["/bin/bash", "-c"]
  7.  
  8. RUN sed -i 's@archive.ubuntu.com@ftp.jaist.ac.jp/pub/Linux@g' /etc/apt/sources.list
  9.  
  10. RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-keys F42ED6FBAB17C654 && \
  11. apt-get update && \
  12. apt-get upgrade -y && \
  13. apt-get install --no-install-recommends curl -y && \
  14. curl -k https://raw.githubusercontent.com/ros/rosdistro/master/ros.key | sudo apt-key add - && \
  15. apt-get install --no-install-recommends -y \
  16. build-essential \
  17. dkms \
  18. openssh-server \
  19. ros-noetic-joy ros-noetic-teleop-twist-joy \
  20. ros-noetic-teleop-twist-keyboard ros-noetic-laser-proc \
  21. ros-noetic-rgbd-launch ros-noetic-rosserial-arduino \
  22. ros-noetic-rosserial-python ros-noetic-rosserial-client \
  23. ros-noetic-rosserial-msgs ros-noetic-amcl ros-noetic-map-server \
  24. ros-noetic-move-base ros-noetic-urdf ros-noetic-xacro \
  25. ros-noetic-compressed-image-transport ros-noetic-rqt* ros-noetic-rviz \
  26. ros-noetic-gmapping ros-noetic-navigation ros-noetic-interactive-markers \
  27. ros-noetic-dynamixel-sdk \
  28. ros-noetic-multirobot-map-merge \
  29. ros-noetic-image-transport \
  30. ros-noetic-cv-bridge \
  31. ros-noetic-vision-opencv \
  32. ros-noetic-gazebo-ros \
  33. ros-noetic-turtlebot3-msgs \
  34. python3-opencv \
  35. libopencv-dev \
  36. ros-noetic-image-proc \
  37. ros-noetic-robot \
  38. nano gedit \
  39. python3-pip \
  40. python-dev && \
  41. apt-get -y autoremove && \
  42. apt-get -y clean && \
  43. rm -rf /var/lib/apt/lists/* && \
  44. pip3 install --upgrade pip && \
  45. pip3 install opencv-contrib-python
  46.  
  47.  
  48. RUN mkdir /var/run/sshd && \
  49. echo 'root:ubuntu' | chpasswd && \
  50. sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
  51. sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
  52.  
  53. EXPOSE 22
  54.  
  55. RUN mkdir -p /home/ubuntu/catkin_ws/src && \
  56. /bin/bash -c "source /opt/ros/noetic/setup.bash ; cd /home/ubuntu/catkin_ws/src ; catkin_init_workspace" && \
  57. /bin/bash -c "source /opt/ros/noetic/setup.bash ; cd /home/ubuntu/catkin_ws && catkin build" && \
  58. echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc && \
  59. echo "source /home/ubuntu/catkin_ws/devel/setup.bash" >> ~/.bashrc && \
  60. echo "export ROS_PACKAGE_PATH=\${ROS_PACKAGE_PATH}:/home/ubuntu/catkin_ws" >> ~/.bashrc && \
  61. echo "export ROS_WORKSPACE=/home/ubuntu/catkin_ws" >> ~/.bashrc && \
  62. echo "alias cm='cd ~/catkin_ws;catkin build'" >> ~/.bashrc && \
  63. echo "alias cs='cd ~/catkin_ws/src'" >> ~/.bashrc && \
  64. echo "export TURTLEBOT3_MODEL=burger" >> ~/.bashrc && \
  65. . ~/.bashrc && \
  66. cd /home/ubuntu/catkin_ws && \
  67. catkin build
  68.  
  69. RUN cd /home/ubuntu/catkin_ws/src && \
  70. git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git && \
  71. git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_autorace_2020.git && \
  72. git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
  73.  
  74. COPY ./startup.sh /startup.sh
  75. COPY ./scripts /home/ubuntu/scripts
  76. COPY ./src /home/ubuntu/catkin_ws/src
  77.  
  78. RUN cd /home/ubuntu/catkin_ws && \
  79. catkin build