This contains helper scripts to build & run cyclonedds core & example applications in docker.
Additionally you can also build a docker image with pre-built cyclonedds examples. This could be useful in quikly trying the examples (both IPC & network communication).
# Bulid docker image
There are two docker images you can build.
- **ubuntu:cyclonedds** : ubuntu bionic based image that contains dependencies to build cyclonedds.
- **cyclonedds:latest** : ubuntu bionic based image with pre-built cyclonedds core & applications (based on the checked out revision).
## How to build the images
### Pre-requisites
- Linux machine (native / runnin inside VM)
- Docker (I have tested with 19.03.8, however past versions also would work, as there is no specific dependency)
### Steps
You can use the helper script `./scripts/docker/build_docker_image.sh` to build the docker images.
- Navigate to root of the project.
- Run the script with -h to display usage.
```
./scripts/docker/build_docker_image.sh [images]
```
The following images are supported.
`ubuntu` : Same as **ubuntu:cyclonedds** , mentioned above.
`cyclonedds` : Same as **cyclonedds:latest**, mentioned above.
You can run the script with `-h` option to display usage information.
- Build cyclonedds core & examples (if you are using **ubuntu:cyclonedds**)
Use the helper script `./scripts/docker/build_cyclonedds.sh` to build using the currently checked out revision.
**NOTE** : You need to run this script from the root of the project.
# Run cyclonedds examples in docker
You can use either of the above docker images to run the examples.
If you use **ubuntu:cyclonedds**, you need to build cyclonedds inside container to build examples.
Once you have built the cyclonedds , you are ready to run the examples inside docker container.
Let's do that !
## Run examples inside the same container (uses IPC)
- Launch docker container, from the root of the project