X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=Dockerfile;h=ad608e482cbe64b6862347f283d314b6f6958ea1;hb=48748faad536cdd4e8166ee28fbb111014c40302;hp=6be155a7fbabb4e751e00b08375ed5aacfcf26da;hpb=bad83880ceaeeff5b73e9e3aa15cdd302829b5fc;p=ric-plt%2Fo1.git diff --git a/Dockerfile b/Dockerfile index 6be155a..ad608e4 100755 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. #---------------------------------------------------------- -FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu18-c-go:4-u18.04-nng AS o1mediator-build +FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:9-u18.04 AS o1mediator-build RUN apt-get update -y && apt-get install -y jq \ git \ @@ -69,12 +69,22 @@ RUN \ RUN \ cd /opt/dev && \ git clone https://github.com/sysrepo/sysrepo.git && \ - cd sysrepo && mkdir build && cd build && \ + cd sysrepo && sed -i -e 's/2000/30000/g;s/5000/30000/g' src/common.h.in && \ + mkdir build && cd build && \ cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_TESTS=OFF -DREPOSITORY_LOC:PATH=/etc/sysrepo .. && \ make -j2 && \ make install && make sr_clean && \ ldconfig +# libssh 0.8.0 +RUN \ + cd /opt/dev && \ + git clone https://git.libssh.org/projects/libssh.git && cd libssh && \ + mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE="Release" -DWITH_ZLIB=ON -DWITH_NACL=OFF -DWITH_PCAP=OFF .. && \ + make -j2 && \ + make install + # libnetconf2 RUN \ cd /opt/dev && \ @@ -89,25 +99,25 @@ RUN \ RUN \ cd /opt/dev && \ git clone https://github.com/CESNET/Netopeer2.git && \ - cd Netopeer2/server && mkdir build && cd build && \ + cd Netopeer2 && mkdir build && cd build && \ cmake -DCMAKE_BUILD_TYPE:String="Release" -DNP2SRV_DATA_CHANGE_TIMEOUT=30000 -DNP2SRV_DATA_CHANGE_WAIT=ON .. && \ make -j2 && \ - make install && \ - cd ../../cli && mkdir build && cd build && \ - cmake -DCMAKE_BUILD_TYPE:String="Release" .. && \ - make -j2 && \ make install # ====================================================================== # RMR -ARG RMRVERSION=3.1.0 -ARG RMRLIBURL=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_${RMRVERSION}_amd64.deb/download.deb -ARG RMRDEVURL=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb +ARG RMRVERSION=4.4.6 +ARG RMRLIBURL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMRVERSION}_amd64.deb/download.deb +ARG RMRDEVURL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb RUN wget --content-disposition ${RMRLIBURL} && dpkg -i rmr_${RMRVERSION}_amd64.deb RUN wget --content-disposition ${RMRDEVURL} && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb RUN rm -f rmr_${RMRVERSION}_amd64.deb rmr-dev_${RMRVERSION}_amd64.deb + +# Install kubectl from Docker Hub +COPY --from=lachlanevenson/k8s-kubectl:v1.16.0 /usr/local/bin/kubectl /usr/local/bin/kubectl + RUN ldconfig # Swagger @@ -133,15 +143,15 @@ RUN mkdir -p api \ # generate swagger client RUN /go/bin/swagger generate client -f api/appmgr_rest_api.yaml -t pkg/ -m appmgrmodel -c appmgrclient -# build and test o1agent -#RUN GO111MODULE=on GO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o o1agent cmd/o1agent.go +# build and test o1agent RUN ./build_o1agent.sh -# make the data model based on the ric yang model +# Install the data models based on the ric yang model RUN /usr/local/bin/sysrepoctl -i /go/src/ws/agent/yang/o-ran-sc-ric-xapp-desc-v1.yang RUN /usr/local/bin/sysrepoctl -i /go/src/ws/agent/yang/o-ran-sc-ric-ueec-config-v1.yang RUN /usr/local/bin/sysrepoctl -i /go/src/ws/agent/yang/o-ran-sc-ric-gnb-status-v1.yang +RUN /usr/local/bin/sysrepoctl -i /go/src/ws/agent/yang/o-ran-sc-ric-alarm-v1.yang CMD ["/bin/bash"] @@ -195,6 +205,8 @@ COPY --from=o1mediator-build /usr/local/share/ /usr/local/share/ COPY --from=o1mediator-build /usr/local/etc/ /usr/local/etc/ COPY --from=o1mediator-build /usr/local/bin/ /usr/local/bin/ COPY --from=o1mediator-build /usr/local/lib/ /usr/local/lib/ +COPY --from=o1mediator-build /usr/local/bin/kubectl /usr/local/bin/kubectl + RUN ldconfig # copy yang models with data