From 3cf5dd96b8e580bb38df4d19a345d6b65c015ffb Mon Sep 17 00:00:00 2001 From: Murilo Silva Date: Tue, 11 Jun 2024 18:53:29 -0300 Subject: [PATCH] fix NEAR_RIC_IP env --- configs/xApp.conf | 4 ++-- docker/Dockerfile | 7 +++++-- scripts/run.sh | 7 +++++++ 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 scripts/run.sh diff --git a/configs/xApp.conf b/configs/xApp.conf index 7084ae1..3a5aca5 100644 --- a/configs/xApp.conf +++ b/configs/xApp.conf @@ -1,6 +1,6 @@ [NEAR-RIC] -NEAR_RIC_IP = ${NEAR_RIC_IP} +NEAR_RIC_IP = 127.0.0.1 [XAPP] DB_DIR = /tmp/ -DB_NAME = iqos_xapp_db +DB_NAME = iqos_xapp_db \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 8085962..283ee1e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -33,7 +33,10 @@ COPY out/bin/xapp_iqos /usr/local/bin/xapp_iqos ## Copy Config file COPY configs/xApp.conf /usr/local/etc/flexric/flexric.conf -# RUN sed -i "s/NEAR_RIC_IP = 127.0.0.1/NEAR_RIC_IP = ${NEAR_RIC_IP}/g" /usr/local/etc/flexric/flexric.conf + +## Copy initialization script +COPY scripts/run.sh /run.sh +RUN chmod +x /run.sh RUN ldconfig && \ echo "--- Check shared objects dependencies for executable nearRT-RIC ---" && \ @@ -53,4 +56,4 @@ LABEL br.ufpa.gercom.image.title="IQoS-xApp" \ ## E42 -- xApp EXPOSE 36422/sctp -CMD ["stdbuf", "-o0", "xapp_iqos"] \ No newline at end of file +ENTRYPOINT ["/run.sh"] \ No newline at end of file diff --git a/scripts/run.sh b/scripts/run.sh new file mode 100644 index 0000000..460aade --- /dev/null +++ b/scripts/run.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +## Setup RIC IP +sed -i "s/NEAR_RIC_IP = 127.0.0.1/NEAR_RIC_IP = ${NEAR_RIC_IP}/g" /usr/local/etc/flexric/flexric.conf + +## Exec xApp bin +stdbuf -o0 xapp_iqos