FROM tiryoh/ros2-desktop-vnc:foxy ENV DEBCONF_NOWARNINGS=yes ENV DEBIAN_FRONTEND noninteractive ENV ROS_PYTHON_VERSION 3 SHELL ["/bin/bash", "-c"] RUN sed -i 's@archive.ubuntu.com@ftp.jaist.ac.jp/pub/Linux@g' /etc/apt/sources.list RUN apt-get update && \ apt-get upgrade -y && \ apt-get install --no-install-recommends -y \ build-essential \ dkms wget git \ openssh-server && \ apt-get autoremove -y && \ apt-get -y clean && \ rm -rf /var/lib/apt/lists/* RUN mkdir /var/run/sshd && \ echo 'root:ubuntu' | chpasswd && \ sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd EXPOSE 22 RUN apt-get update && \ apt-get upgrade -y && \ apt-get install --no-install-recommends -y \ libopencv-dev \ python3-colcon-common-extensions && \ cd /home/ubuntu && \ git clone https://github.com/ROBOTIS-GIT/robotis_tools.git && \ cd robotis_tools && \ chmod 755 ./install_ros2_foxy.sh && \ /bin/bash ./install_ros2_foxy.sh && \ apt-get install --no-install-recommends -y \ ros-foxy-gazebo-ros-pkgs \ ros-foxy-cartographer \ ros-foxy-cartographer-ros \ ros-foxy-navigation2 \ ros-foxy-nav2-bringup \ python3-vcstool \ ros-foxy-dynamixel-sdk \ ros-foxy-turtlebot3* && \ apt-get -y autoremove && \ apt-get -y clean && \ rm -rf /var/lib/apt/lists/* RUN mkdir -p /home/ubuntu/colcon_ws/src && \ echo "source /opt/ros/foxy/setup.bash" >> ~/.bashrc && \ echo "source /home/ubuntu/colcon_ws/install/setup.bash" >> ~/.bashrc && \ echo "export ROS_DOMAIN_ID=30 #TURTLEBOT3" >> ~/.bashrc && \ echo "alias cm='cd ~/colcon_ws;colcon build'" >> ~/.bashrc && \ echo "alias cs='cd ~/colcon_ws/src'" >> ~/.bashrc && \ echo "export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/colcon_ws/src/turtlebot3_simulations/turtlebot3_gazebo/models" >> ~/.bashrc && \ echo "export TURTLEBOT3_MODEL=burger " >> ~/.bashrc && \ apt-get update && \ apt-get upgrade -y && \ cd /home/ubuntu/colcon_ws/src && \ . /opt/ros/foxy/setup.bash && \ . /home/ubuntu/colcon_ws/install/setup.bash && \ colcon build && \ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git && \ git clone -b ros2-devel https://github.com/ROBOTIS-GIT/turtlebot3_machine_learning.git && \ git clone -b foxy-devel https://github.com/ros-planning/navigation2.git && \ git clone -b foxy-devel https://github.com/SteveMacenski/slam_toolbox.git && \ cd /home/ubuntu/colcon_ws && \ colcon build --symlink-install --parallel-workers 1 && \ apt-get autoremove -y && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* COPY ./src /home/ubuntu/colcon_ws/src RUN cd /home/ubuntu/colcon_ws && \ colcon build --symlink-install --parallel-workers 1 COPY ./scripts /home/ubuntu/scripts COPY ./startup.sh /startup.sh