docker source-build - colcon build is not processing packages
Hi everybody,
I'm trying to install ROS2 Galactic in an existing docker image with a dockerfile. As it should run on a Nvidia Jetson Xavier NX I used a nvidia:l4t-base image. Therefore i need to do a source build of Galactic. I followed the offical instructions and now im struggling with the colcon build (Build the code in the workspace).
I always get "Summary: 0 packages finished [0.52s]"
The failing part of the docker file:
# ROS Build the code in the workspace
RUN sudo mkdir /opt/ros
RUN /bin/bash -c "cd ~/ros2_galactic/ && colcon build --merge-install --install-base /opt/ros/galactic"
Other tryouts:
# 1 (like official guide)
RUN cd ~/ros2_galactic/
RUN colcon build --symlink-install
# 2
RUN sudo mkdir /opt/ros
RUN cd ~/ros2_galactic/
RUN colcon build --merge-install --install-base /opt/ros/galactic
As you can see in the commented part I tried some stuff ;-)
But the output is always:
#All required rosdeps installed successfully
Removing intermediate container 5c2fe36c7090
---> 506a73730818
Step 31/33 : RUN sudo mkdir /opt/ros
---> Running in 5cf09e067579
Removing intermediate container 5cf09e067579
---> 86454cf5bc62
Step 32/33 : RUN cd ~/ros2_galactic/
---> Running in 1a5a151b3be1
Removing intermediate container 1a5a151b3be1
---> 44615039d2bc
Step 33/33 : RUN /bin/bash -c "colcon build --merge-install --install-base /opt/ros/galactic"
---> Running in 53facd0527ea
Summary: 0 packages finished [0.52s]
Removing intermediate container 53facd0527ea
---> 61af90dd1740
Successfully built 61af90dd1740
Successfully tagged ros2/galactic:sourcebuild
However - If I run a container from that created image and do it manually it works and colcon starts compiling.
botdev@xaviernx:~/docker-galactic$ docker run -it --rm ros2/galactic:sourcebuild
root@418f2f9f675a:/usr/local# cd ~/ros2_galactic/
root@418f2f9f675a:~/ros2_galactic# colcon build --merge-install --install-base /opt/ros/galactic
Starting >>> ament_package
Starting >>> ament_lint
Starting >>> gtest_vendor
Starting >>> fastcdr
Starting >>> ament_cppcheck
Starting >>> iceoryx_utils
Aborted <<< fastcdr [3.44s]
Aborted <<< iceoryx_utils [3.43s]
Aborted <<< ament_cppcheck [3.48s]
...
Any help is appreciated - thanks in advance.