From 9be1d1be73f5eb419bc16209a685c37821df36f5 Mon Sep 17 00:00:00 2001 From: e-tmplr <160745041+e-tmplr@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:57:20 +0100 Subject: [PATCH 1/3] Use Ubuntu Jammy for newer version of CMake --- scripts/docker/Dockerfile | 2 +- scripts/docker/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 2df0375578..72d2d864ae 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -8,7 +8,7 @@ # SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause -FROM ubuntu:bionic +FROM ubuntu:jammy # Dependencies required to build cyclonedds RUN apt update && apt install -y \ diff --git a/scripts/docker/README.md b/scripts/docker/README.md index ee6f1ba01d..307d984ccc 100644 --- a/scripts/docker/README.md +++ b/scripts/docker/README.md @@ -5,8 +5,8 @@ Additionally you can also build a docker image with pre-built cyclonedds example # 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). +- **ubuntu:cyclonedds** : ubuntu jammy based image that contains dependencies to build cyclonedds. +- **cyclonedds:latest** : ubuntu jammy based image with pre-built cyclonedds core & applications (based on the checked out revision). ## How to build the images From 594d0a8cd43e1a41a6d43e4b5b53275686229a12 Mon Sep 17 00:00:00 2001 From: e-tmplr <160745041+e-tmplr@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:58:08 +0100 Subject: [PATCH 2/3] Enable building the examples --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 29aaea0906..c5b40a3a55 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -58,6 +58,6 @@ fi mkdir -p build cd build -cmake -DCMAKE_INSTALL_PREFIX=$CYCLONEDDS_INSTALL_PREFIX -DBUILD_IDLC=ON .. +cmake -DCMAKE_INSTALL_PREFIX=$CYCLONEDDS_INSTALL_PREFIX -DBUILD_IDLC=ON -DBUILD_EXAMPLES=ON .. cmake --build . cmake --build . --target install From df7cc31f5a2b902d85aa5f606d27ae6b03269ee8 Mon Sep 17 00:00:00 2001 From: e-tmplr <160745041+e-tmplr@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:58:32 +0100 Subject: [PATCH 3/3] Automatically remove the named container to allow reruns --- scripts/docker/build_cyclonedds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/build_cyclonedds.sh b/scripts/docker/build_cyclonedds.sh index 9e364cae0f..c03f20d248 100755 --- a/scripts/docker/build_cyclonedds.sh +++ b/scripts/docker/build_cyclonedds.sh @@ -21,6 +21,6 @@ echo "WORKSPACE is $WORKSPACE" docker run -it --rm -v $WORKSPACE/:/cyclonedds --workdir /cyclonedds $IMAGE_NAME /bin/bash -c "./scripts/build.sh clean" # Launch the docker after build -docker run --name $CONTAINER_NAME -it -v $WORKSPACE/:/cyclonedds --workdir /cyclonedds $IMAGE_NAME /bin/bash +docker run --name $CONTAINER_NAME -it --rm -v $WORKSPACE/:/cyclonedds --workdir /cyclonedds $IMAGE_NAME /bin/bash # If you want to connect to the above docker to run cyclonedds examples (multiple apps in separate terminals) , use the below command # docker exec -it cyclonedds /bin/bash \ No newline at end of file