3. Docker image¶
eProsima no longer distributes a standalone Docker image of DDS Router. However, the Fast DDS Suite Docker image is provided for those who want a Docker image with a set of eProsima’s tools and libraries running on an Ubuntu platform. It can be downloaded from eProsima’s Downloads Page.
This image contains the full Fast DDS Suite, and an instance of DDS Router can be configured using a YAML configuration file provided by the user and shared with the Docker container. The steps to run DDS Router in a Docker container are explained below.
Download the compressed Docker image in
.tarformat from the eProsima’s Downloads Page and load it into your local Docker running the following command in a terminal:docker load -i "ubuntu-fastdds-suite_<fastdds-version>.tar"
where
fastdds-versionis the downloaded version of eProsima Fast DDS.Build a DDS Router configuration YAML file on the local machine. This will be the DDS Router configuration file that runs inside the Docker container. Open your preferred text editor and copy the General Example, or a full example from the Examples section, into the
/<dds_router_ws>/DDS_ROUTER_CONFIGURATION.yamlfile, wheredds_router_wsis the path of the configuration file. To make this accessible from the Docker container we will create a shared volume containing just this file. This is explained in the next point.Run the Docker container executing the following command:
docker run -it \ --net=host \ --ipc=host \ -v /<dds_router_ws>/DDS_ROUTER_CONFIGURATION.yaml:/root/DDS_ROUTER_CONFIGURATION.yaml \ ubuntu-fastdds-suite:<fastdds-version> \ ddsrouter --config-path /root/DDS_ROUTER_CONFIGURATION.yaml
Both the path to the configuration file hosted in the local machine and the one created in the Docker container must be absolute paths in order to share just one single file as a shared volume.
After executing the previous command you should be able to see the initialization traces from the DDS Router running in the Docker container. If you want to terminate the application gracefully, just press
Ctrl+Cto stop the execution of DDS Router.