3. Docker image¶
eProsima distributes a Docker image of DDS Router with Ubuntu 20.04 as base image. This image launches an instance of DDS Router that is 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 Downloads website. It is strongly recommended to download the image corresponding to the latest version of DDS Router.
Extract the image by executing the following command:
versionis the downloaded version of DDS Router.
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. To continue this installation manual, let’s use one of the configuration files provided in the Examples section. Open your preferred text editor and copy a full example from the Examples section into the
dds_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 next point.
Run the Docker container executing the following command:
docker run -it \ --net=host \ -v /<dds_router_ws>/DDS_ROUTER_CONFIGURATION.yaml:/root/DDS_ROUTER_CONFIGURATION.yaml \ ubuntu-ddsrouter:v0.3.0
It is important to mention that 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.