X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=build%2FDockerfile;h=466f3cc5e2eaefc4353e94af61bb83a2ca925d2a;hb=refs%2Fchanges%2F67%2F12267%2F1;hp=6b07240e6d4f6affbef5af78d7ef1c6fcbccb73a;hpb=bb304df4db23c4e17ede58c9393aa5f78ff5e044;p=ric-plt%2Falarm-go.git diff --git a/build/Dockerfile b/build/Dockerfile index 6b07240..466f3cc 100755 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -18,10 +18,19 @@ # platform project (RICP). #================================================================================== -FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as ubuntu-alarm-manager +FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.0 as ubuntu-alarm-manager + +RUN apt update && apt install --reinstall -y ca-certificates && update-ca-certificates # Install utilities -RUN apt update && apt install -y iputils-ping net-tools curl sudo +RUN apt update && apt install -y iputils-ping net-tools curl sudo build-essential + +# Installing the go version +ENV GOLANG_VERSION 1.20.4 +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" # Install dependencies, compile and test the module RUN mkdir -p /go/src/am @@ -32,7 +41,7 @@ WORKDIR "/go/src/am" RUN ./build/build_ubuntu.sh # Final, executable and deployable container -FROM ubuntu:18.04 +FROM ubuntu:20.04 COPY --from=ubuntu-alarm-manager /go/src/am/build/run.sh / COPY --from=ubuntu-alarm-manager /go/src/am/manager/alarm-manager /