Installing Go and the RMR library in the image
Installing Go and the RMR library in the image.
Signed-off-by: naman.gupta <naman.gupta@samsung.com>
Change-Id: I443751f06ea77a7cad0255995e5200a3027f2a25
diff --git a/a1-go/Dockerfile b/a1-go/Dockerfile
index be0eafb..a89ed15 100644
--- a/a1-go/Dockerfile
+++ b/a1-go/Dockerfile
@@ -14,7 +14,7 @@
#-----------------------------------------------------------
-FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 AS a1-build
+FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.1.0 AS a1-build
RUN apt-get update -y && apt-get install -y jq
@@ -24,6 +24,18 @@
&& \
update-ca-certificates
+#Install RMR
+
+ARG RMR_VER=4.8.3
+ARG RMR_PKG_URL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/
+
+RUN wget -nv --content-disposition ${RMR_PKG_URL}/rmr_${RMR_VER}_amd64.deb/download.deb
+RUN wget -nv --content-disposition ${RMR_PKG_URL}/rmr-dev_${RMR_VER}_amd64.deb/download.deb
+RUN dpkg -i rmr_${RMR_VER}_amd64.deb \
+ && dpkg -i rmr-dev_${RMR_VER}_amd64.deb \
+ && ldconfig
+
+
ENV PATH="/usr/local/go/bin:${PATH}"
ENV GOPATH="/go"
@@ -40,6 +52,13 @@
# build and test
COPY . /go/src/ws
+COPY ./config/uta_rtg.rt /opt/a1-mediator/
+
+ENV RMR_RTG_SVC=-1
+ENV RMR_LOG_VLEVEL=5
+ENV CFG_FILE=/opt/a1-mediator/config-file.json
+ENV RMR_SEED_RT=/opt/a1-mediator/uta_rtg.rt
+
# Build the code
RUN GO111MODULE=on GO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/src/ws/cache/go/cmd/a1 cmd/a1.go
@@ -56,9 +75,20 @@
FROM ubuntu:18.04 as a1-mediator
RUN apt-get update -y \
- && apt-get install --reinstall -y sudo openssl ca-certificates ca-cacert \
+ && apt-get install --reinstall -y sudo openssl ca-certificates ca-cacert wget\
&& apt-get clean && update-ca-certificates
+#Install RMR
+
+ARG RMR_VER=4.8.3
+ARG RMR_PKG_URL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/
+
+RUN wget -nv --content-disposition ${RMR_PKG_URL}/rmr_${RMR_VER}_amd64.deb/download.deb
+RUN wget -nv --content-disposition ${RMR_PKG_URL}/rmr-dev_${RMR_VER}_amd64.deb/download.deb
+RUN dpkg -i rmr_${RMR_VER}_amd64.deb \
+ && dpkg -i rmr-dev_${RMR_VER}_amd64.deb \
+ && ldconfig
+
#
# a1-mediator
#