This guide will take you through the process of compiling and runnning an OpenDDS application with Docker. Docker images containing a pre-built OpenDDS are available on DockerHub. An image corresponding to a particular release has a tag of the form release-DDS-X.xx, e.g., release-DDS-3.12.


Check that docker and docker-compose are installed.

docker --version
docker-compose --version
Compile the Messenger Example
  1. Enter a container

    docker run --rm -ti -v "$PWD:/opt/workspace" objectcomputing/opendds
  2. Copy the Messenger directory which contains an example from the Developer's Guide

    cp -R /opt/OpenDDS/DevGuideExamples/DCPS/Messenger Messenger
    cd Messenger
  3. Configure and build the Messenger example -type gnuace
  4. Exit the container

Run the Messenger Example with RTPS
  1. Enter the Messenger directory

    cd Messenger
  2. Create an rtps.ini file to control discovery with the following content

  3. Run the Messenger example with RTPS

    docker-compose up
Run the Messenger Example with InfoRepo
  1. Run the Messenger example with InfoRepo

    docker-compose -f docker-compose-inforepo.yml up
  2. Use Control-C to kill the InfoRepo process

Next Steps

See Chapter 2 of the Developer's Guide for a detailed explanation of the Messenger C++ Example or Chapter 10 for the Java Example.