From 3d163fb76d78367322454bf90b70c5dba51bd206 Mon Sep 17 00:00:00 2001 From: dominikn Date: Wed, 9 Aug 2023 12:13:15 +0200 Subject: [PATCH] if XRCE_DOMAIN_ID_OVERRIDE is not set try to set it from ROS_DOMAIN_ID --- .github/workflows/build_push.yaml | 2 +- Dockerfile | 3 +++ entrypoint.sh | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_push.yaml b/.github/workflows/build_push.yaml index 7a0e8bf..71f4819 100644 --- a/.github/workflows/build_push.yaml +++ b/.github/workflows/build_push.yaml @@ -34,7 +34,7 @@ jobs: - name: Build and push uses: docker/build-push-action@v2 with: - platforms: linux/amd64, linux/arm64 + platforms: linux/amd64 #, linux/arm64 push: true build-args: | MICRO_XRCE_DDS_AGENT_RELEASE=${{ env.MICRO_XRCE_DDS_AGENT_RELEASE }} diff --git a/Dockerfile b/Dockerfile index 3f1a1ce..7086815 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,6 +50,9 @@ RUN curl -L https://github.com/husarnet/husarnet-dds/releases/download/${HUSARNE # ======================= FROM ubuntu:22.04 +ENV ROS_DOMAIN_ID= +ENV XRCE_DOMAIN_ID_OVERRIDE= + WORKDIR /root COPY --from=build /agent/install/ /usr/local/ diff --git a/entrypoint.sh b/entrypoint.sh index 92e08c8..6ebd433 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,4 +6,11 @@ if [[ "$HUSARNET_DDS_DEBUG" == "TRUE" ]]; then echo "$output" fi +if [ -z "${XRCE_DOMAIN_ID_OVERRIDE}" ]; then + if [ -n "${ROS_DOMAIN_ID}" ]; then + export XRCE_DOMAIN_ID_OVERRIDE="${ROS_DOMAIN_ID}" + fi +fi + + exec "$@" \ No newline at end of file