Dockerfile 906 B

123456789101112131415161718192021222324252627
  1. FROM ros:foxy
  2. RUN apt-get update && apt-get install -y --no-install-recommends \
  3. wget nano build-essential libomp-dev clang lld git\
  4. ros-foxy-geodesy ros-foxy-pcl-ros ros-foxy-nmea-msgs \
  5. ros-foxy-rviz2 ros-foxy-libg2o \
  6. && apt-get clean \
  7. && rm -rf /var/lib/apt/lists/*
  8. RUN mkdir -p /root/colcon_ws/src
  9. WORKDIR /root/colcon_ws/src
  10. # Comment it out until the repository supports ROS2 builds.
  11. # RUN git clone https://github.com/SMRT-AIST/fast_gicp.git --recursive --depth=1
  12. # RUN git clone https://github.com/koide3/hdl_graph_slam.git --depth=1
  13. COPY . /root/colcon_ws/src/ndt_omp/
  14. RUN update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld 50
  15. WORKDIR /root/colcon_ws
  16. RUN /bin/bash -c '. /opt/ros/foxy/setup.bash; CC=clang CXX=clang++ colcon build'
  17. RUN sed -i "6i source \"/root/colcon_ws/devel/setup.bash\"" /ros_entrypoint.sh
  18. WORKDIR /
  19. ENTRYPOINT ["/ros_entrypoint.sh"]
  20. CMD ["bash"]