X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=Dockerfile;h=c61aded4d3f1e4c5b29d31a51693dc413d71c7b1;hb=HEAD;hp=c741132df194b8a888c39c234c498a8ee9b8824e;hpb=2bfaef02e6141e5870ee0fca20b428223d00d8e9;p=ric-plt%2Fvespamgr.git diff --git a/Dockerfile b/Dockerfile index c741132..c61aded 100755 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ # platform project (RICP). # -FROM golang:1.12 as gobuild-vespamgr +FROM golang:1.16 as gobuild # Install utilities RUN apt update && apt install -y iputils-ping net-tools curl sudo @@ -31,6 +31,9 @@ WORKDIR $GOPATH/src/VESPA RUN git clone -b v0.3.0 https://github.com/nokia/ONAP-VESPA.git $GOPATH/src/VESPA RUN GO111MODULE=on go mod download +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 # Install VES Agent RUN export GOPATH=$HOME/go && \ @@ -46,16 +49,16 @@ WORKDIR /go/src/vespamgr RUN ./build_vesmgr.sh # Final, executable and deployable container -FROM ubuntu:18.04 +FROM ubuntu:20.04 RUN mkdir -p /etc/ves-agent -COPY --from=gobuild-vespamgr /usr/local/lib /usr/local/lib -COPY --from=gobuild-vespamgr /root/go/bin /root/go/bin -COPY --from=gobuild-vespamgr /root/go/bin/vespamgr /usr/local/bin/vesmgr -COPY --from=gobuild-vespamgr /root/go/bin/vespamgr /vespamgr -COPY --from=gobuild-vespamgr /go/src/vespamgr/config/* /cfg/ - +COPY --from=gobuild /usr/local/lib /usr/local/lib +COPY --from=gobuild /root/go/bin /root/go/bin +COPY --from=gobuild /root/go/bin/vespamgr /usr/local/bin/vesmgr +COPY --from=gobuild /root/go/bin/vespamgr /vespamgr +COPY --from=gobuild /go/src/vespamgr/config/* /cfg/ +COPY --from=gobuild /go/src/vespamgr/config/plt-counter.json /cfg/plt-counter.json RUN ldconfig ENV CFG_FILE=/cfg/config-file.json