[ros-users] [Discourse.ros.org] [General] Announcing Officia…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Lander Usategui San Juan via Discourse.ros.org via ros-users
Date:  
To: ros-users
CC: Lander Usategui San Juan via Discourse.ros.org
Subject: [ros-users] [Discourse.ros.org] [General] Announcing Official Docker Images for ROS2


Hi @ruffsl,

first of all thank you for this!

Minor comment on **Creating a `Dockerfile` to build ROS packages**:

This line fails:

> RUN git -C src clone \

      -b $ROS_DISTRO \
      https://github.com/ros2/demos.git


There is no crystal branch on ros2/demos (at least not yet).

```bash
Cloning into 'demos'...
fatal: Remote branch crystal not found in upstream origin
The command '/bin/sh -c git -C src clone       -b $ROS_DISTRO       https://github.com/ros2/demos.git' returned a non-zero code: 128
```


If you change to master branch works without problems. Like:

```bash
FROM ros:crystal-ros-base

# install ros build tools
RUN apt-get update && apt-get install -y \
      python3-colcon-common-extensions && \
    rm -rf /var/lib/apt/lists/*


# clone ros package repo
ENV ROS_WS /opt/ros_ws
RUN mkdir -p $ROS_WS/src
WORKDIR $ROS_WS
RUN git -C src clone \
      -b master \
      https://github.com/ros2/demos.git


# install ros package dependencies
RUN apt-get update && \
    rosdep update && \
    rosdep install -y \
      --from-paths \
        src/demos/demo_nodes_cpp \
      --ignore-src && \
    rm -rf /var/lib/apt/lists/*


# build ros package source
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
    colcon build \
      --packages-select \
        demo_nodes_cpp \
      --cmake-args \
        -DCMAKE_BUILD_TYPE=Release


# copy ros package install via multi-stage
FROM ros:crystal-ros-core
ENV ROS_WS /opt/ros_ws
COPY --from=0 $ROS_WS/install $ROS_WS/install

# source ros package from entrypoint
RUN sed --in-place --expression \
      '$isource "$ROS_WS/install/setup.bash"' \
      /ros_entrypoint.sh


CMD ["bash"]
```

Regards,

@LanderU





---
[Visit Topic](https://discourse.ros.org/t/announcing-official-docker-images-for-ros2/7381/3) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list

http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>