From 657b4728e0c51ad13ce020df9cb695ca70f82a46 Mon Sep 17 00:00:00 2001 From: Abdulwahid Date: Tue, 11 Nov 2025 12:06:36 +0000 Subject: [PATCH] RIC-1074: Update base OS to ubuntu22.04 and golang to 1.22 Change-Id: I347ab5f335abb26aaed61b4e9536eacb7524a6ad Signed-off-by: Abdulwahid --- Dockerfile | 23 +++++++++++++++-------- agent/go.mod | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6fceabf..23fa37c 100755 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. #---------------------------------------------------------- -FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.0 AS o1mediator-build +FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu22-c-go:1.0.0 AS o1mediator-build RUN apt update && apt install --reinstall -y \ ca-certificates \ @@ -37,11 +37,18 @@ RUN apt-get update -y && apt-get install -y jq \ libssl-dev \ swig \ iputils-ping \ - python-dev -#ENV GOLANG_VERSION 1.13.10 -#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}" + python-dev-is-python3 + +ARG GOVERSION="1.22.5" +RUN wget -nv https://dl.google.com/go/go${GOVERSION}.linux-amd64.tar.gz \ + && tar -xf go${GOVERSION}.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 + ENV GOPATH="/go" # ====================================================================== @@ -162,7 +169,7 @@ RUN /usr/local/bin/sysrepoctl -i /go/src/ws/agent/yang/o-ran-sc-ric-alarm-v1.yan CMD ["/bin/bash"] #---------------------------------------------------------- -FROM ubuntu:20.04 as o1mediator +FROM ubuntu:22.04 as o1mediator RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y jq \ net-tools \ @@ -182,7 +189,7 @@ RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y jq \ #libssh-dev \ libssl-dev \ swig \ - python-dev \ + python-dev-is-python3 \ wget \ && pip3 install supervisor-stdout \ && pip3 install psutil \ diff --git a/agent/go.mod b/agent/go.mod index 9a13f0d..411a9c5 100644 --- a/agent/go.mod +++ b/agent/go.mod @@ -1,6 +1,6 @@ module gerrit.oran-osc.org/r/ric-plt/o1mediator -go 1.18 +go 1.22 replace gerrit.o-ran-sc.org/r/ric-plt/xapp-frame => gerrit.o-ran-sc.org/r/ric-plt/xapp-frame.git v0.9.1 -- 2.16.6