From b81da07336302d6f7a4e11c086b800d9376a3a96 Mon Sep 17 00:00:00 2001 From: HariomGupta Date: Mon, 7 Dec 2020 13:26:56 +0530 Subject: [PATCH] updated Dockerfile for O1 Module [Issue-Id: ODUHIGH-257] Signed-off-by: HariomGupta Change-Id: I82599f74bd71374d51596741806b6aaa2f9a6b11 --- Dockerfile | 22 ++++++++++++++++++++++ build/o1/install_lib.sh | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) mode change 100644 => 100755 build/o1/install_lib.sh diff --git a/Dockerfile b/Dockerfile index 2010fae52..ddb9446f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,19 @@ FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:9-u18.04 as ubuntu +# ====================================================================== +# add netconf user +RUN \ + adduser --system netconf && \ + echo "netconf:netconf" | chpasswd + +# generate ssh keys for netconf user +RUN \ + mkdir -p /home/netconf/.ssh && \ + ssh-keygen -A && \ + ssh-keygen -t dsa -P '' -f /home/netconf/.ssh/id_dsa && \ + cat /home/netconf/.ssh/id_dsa.pub > /home/netconf/.ssh/authorized_keys + + ADD . /opt/o-du-l2 WORKDIR /opt/o-du-l2 @@ -8,3 +22,11 @@ RUN apt-get update && apt-get install -y libpcap-dev RUN cd build/odu && make clean_odu odu MACHINE=BIT64 MODE=FDD #CMD /opt/o-du-l2/bin/odu/odu + +#cleanup netconf folder and install libraries +RUN cd build/o1 && rm -rf netconf && /bin/bash install_lib.sh -c + +RUN cd build/o1 && make o1 MACHINE=BIT64 + +# Install the data models based on the ODU yang model +RUN /usr/local/bin/sysrepoctl -i build/o1/yang/o-ran-sc-odu-alarm-v1.yang diff --git a/build/o1/install_lib.sh b/build/o1/install_lib.sh old mode 100644 new mode 100755 index f807ba35d..46efb3ece --- a/build/o1/install_lib.sh +++ b/build/o1/install_lib.sh @@ -187,7 +187,7 @@ acknowledge() { #show help for user to provide valid input show_help(){ echo "use -c option for cleanup" - echo "ex : $./install_netconf.sh -c" + echo "ex : $./install_lib.sh -c" exit } -- 2.16.6