X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=Dockerfile;h=09059e032a421733eb309cc782f63868ec55e487;hb=HEAD;hp=1d64d4a60302a1fc0c5ddc06562fb801e3765bd1;hpb=598215e1e9ab19d69146bb17408d5ce119a9b230;p=ric-plt%2Frtmgr.git diff --git a/Dockerfile b/Dockerfile index 1d64d4a..09059e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,18 +23,19 @@ # a Docker tag from the string in file container-tag.yaml #FROM golang:1.12.1 as rtmgrbuild -FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu18-c-go:4-u18.04-nng as rtmgrbuild +FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.0 as rtmgrbuild +RUN apt update && apt install ca-certificates libgnutls30 -y # Install RMr shared library -ARG RMRVERSION=3.6.0 -RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr_${RMRVERSION}_amd64.deb && rm -rf rmr_${RMRVERSION}_amd64.deb +ARG RMRVERSION=4.9.4 +RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr_${RMRVERSION}_amd64.deb && rm -rf rmr_${RMRVERSION}_amd64.deb # Install RMr development header files -RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb && rm -rf rmr-dev_${RMRVERSION}_amd64.deb +RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb && rm -rf rmr-dev_${RMRVERSION}_amd64.deb -ENV GOLANG_VERSION 1.12.1 -RUN wget --quiet https://dl.google.com/go/go$GOLANG_VERSION.linux-amd64.tar.gz \ - && tar xvzf go$GOLANG_VERSION.linux-amd64.tar.gz -C /usr/local -ENV PATH="/usr/local/go/bin:${PATH}" +#ENV GOLANG_VERSION 1.16 +#RUN wget --quiet https://dl.google.com/go/go$GOLANG_VERSION.linux-amd64.tar.gz \ +# && tar xvzf go$GOLANG_VERSION.linux-amd64.tar.gz -C /usr/local +#ENV PATH="/usr/local/go/bin:${PATH}" ENV GOPATH /go RUN mkdir -p /go/bin @@ -65,20 +66,21 @@ COPY cmd cmd COPY run_rtmgr.sh /run_rtmgr.sh RUN mkdir manifests COPY manifests/ /go/src/routing-manager/manifests -#RUN go mod download -#RUN /usr/local/go/bin/go mod tidy +COPY "uta_rtg_ric.rt" / ENV GOPATH /go ENV GOBIN /go/bin +RUN go mod download RUN go install ./cmd/rtmgr.go # UT intermediate container #FROM rtmgrbuild as rtmgrut #RUN ldconfig +#ENV RMR_SEED_RT "/uta_rtg_ric.rt" #RUN go test ./pkg/sbi ./pkg/rpe ./pkg/nbi ./pkg/sdl -f "/go/src/routing-manager/manifests/rtmgr/rtmgr-cfg.yaml" -cover -race # Final, executable container -FROM ubuntu:16.04 +FROM ubuntu:20.04 COPY --from=rtmgrbuild /go/bin/rtmgr / COPY --from=rtmgrbuild /run_rtmgr.sh / COPY --from=rtmgrbuild /usr/local/include /usr/local/include