ROS 2 Humble: Docker exec Terminals Can't Communicate on Jetson Orin (JetPack 6)

## Concise Problem Summary:

Hello,

I’m running into a ROS 2 Humble communication issue on a Jetson Orin Nano with JetPack 6.

Nodes running in separate terminal sessions inside the same Docker container cannot communicate. For example, if I start a container with docker run --network host ... and run the listener demo, and then open a second shell into that same container with docker exec and run the talker demo, the listener receives no messages.

This is not a general ROS 2 issue, as the talker and listener communicate perfectly when run in a single terminal (with one in the background). My full C++ perception pipeline also works correctly on the host OS, outside of Docker.

This seems to be a specific problem with ROS 2 DDS discovery between docker exec sessions on the Jetson platform. Has anyone else encountered this, and is there a known configuration or workaround?

Thank you.

Hi,
Please share which docker you use(weblink to the docker), and what command is run to launch the docker on developer kit.

The latest Jetpack version is 6.2.1. If you use previous version, would suggest upgrade.

Thank you. I can confirm I am running JetPack 6.0 (L4T R36.2.0). Before I go through the upgrade process, could you please confirm if the ROS 2 DDS discovery issue between docker exec sessions is a known bug in this specific version that is resolved in 6.2.1?
We are using a custom image built from the official L4T ML container for JetPack 6. Here is the complete Dockerfile that we successfully built:

Start from the NVIDIA ML container

FROM nvcr.io/nvidia/l4t-ml:r36.2.0-py3
Set environment variables for non-interactive installs and library paths
ENV DEBIAN_FRONTEND=noninteractive
ENV LD_LIBRARY_PATH=/opt/ros/humble/lib/aarch64-linux-gnu:${LD_LIBRARY_PATH}
Install all system dependencies, including ROS 2 and GUI tools
RUN apt-get update && apt-get install -y --no-install-recommends
git build-essential cmake libopenblas-dev libomp-dev python3-dev python3-pip
curl software-properties-common xterm &&
add-apt-repository universe &&
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg &&
echo “deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main” | tee /etc/apt/sources.list.d/ros2.list > /dev/null &&
apt-get update &&
apt-get install -y
ros-humble-ros-base
ros-humble-rviz2
ros-humble-pcl-conversions
ros-humble-vision-msgs
ros-humble-can-msgs
ros-humble-tf2-ros
ros-humble-demo-nodes-cpp
python3-colcon-common-extensions &&
apt-get clean &&
rm -rf /var/lib/apt/lists/*

docker run -it --rm --name jetson_dev --gpus all --network host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/ros2_ws_clean:/workspace/ros2_ws_clean -v /mnt/ssd1tb:/mnt/ssd1tb ros2-ai-env bash

Hello,

Thank you for the follow-up. Let me provide a crucial clarification.

After more testing, I’ve found that communication does work if I start a single container and open multiple shells into it with docker exec.

However, the core problem remains: communication fails between two completely separate container instances that are each started with a separate docker run command.

For our project’s architecture, this multi-container communication is a critical feature, so the current failure is a significant blocker.

Could you please confirm if this failure of DDS discovery between separate docker run containers (both using --network host) is a known issue on JetPack 6? Is there a specific configuration for Docker or the DDS middleware required to enable it?

Thank you.