###########################################################
FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as submgrcore
+ARG g14="1.14.4"
+ARG GOVERSION="1.14"
+RUN wget -nv https://dl.google.com/go/go${g14}.linux-amd64.tar.gz \
+ && tar -xf go${g14}.linux-amd64.tar.gz \
+ && mv go /opt/go/${GOVERSION} \
+ && rm -f go*.gz
+
+ENV DEFAULTPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ENV PATH=$DEFAULTPATH:/usr/local/go/bin:/opt/go/${GOVERSION}/bin:/root/go/bin
+
+# Update CA certificates
+RUN apt update && apt install --reinstall -y \
+ ca-certificates \
+ && \
+ update-ca-certificates
+
RUN apt update && apt install -y iputils-ping net-tools curl tcpdump gdb valgrind
WORKDIR /tmp
&& cat /etc/hosts.new > /etc/hosts \
&& cat /etc/hosts \
&& go test -failfast -test.coverprofile /tmp/submgr_cover.out -count=1 -v ./pkg/control \
- && go tool cover -html=/tmp/submgr_cover.out -o /tmp/submgr_cover.html
+ && go tool cover -html=/tmp/submgr_cover.out -o /tmp/submgr_cover.html
# test formating (not important)
RUN test -z "$(gofmt -l pkg/control/*.go)"
COPY --from=submgrbuild /manifests /manifests
COPY --from=submgrbuild /opt/bin/submgr /
-COPY --from=submgrbuild /usr/local/include /usr/local/include
-COPY --from=submgrbuild /usr/local/lib /usr/local/lib
+COPY --from=submgrbuild /usr/local/include/rmr /usr/local/include/
+COPY --from=submgrbuild /usr/local/lib/librmr* /usr/local/lib/
+COPY --from=submgrbuild /usr/local/lib/libe2ap* /usr/local/lib/
RUN ldconfig
COPY run_submgr.sh /