Added bldr-image-ubuntu22-c-go. Initial commit 60/11160/1 0.1.0
authorAbhijit Gadgil <gabhijit@iitbombay.org>
Fri, 4 Aug 2023 03:27:46 +0000 (08:57 +0530)
committerAbhijit Gadgil <gabhijit@iitbombay.org>
Fri, 4 Aug 2023 03:31:52 +0000 (09:01 +0530)
The differences compared to Ubuntu 20 Image are as follows -

1. python3-dev, in place of python-dev
2. removed deprecated zlibc
3. Go version 1.18.10 (available versions: 1.18, 1.19, 1.20)
4. sonar-cli version 4.8.0 (previously 4.2.0)
5. go-lint version 1.53.3 (previously 1.23)

Change-Id: Ibd8ac996bdf43ed244cebf281314f530d600b273
Signed-off-by: Abhijit Gadgil <gabhijit@iitbombay.org>
bldr-imgs/bldr-ubuntu22-c-go/Dockerfile [new file with mode: 0644]
bldr-imgs/bldr-ubuntu22-c-go/container-tag.yaml [new file with mode: 0644]

diff --git a/bldr-imgs/bldr-ubuntu22-c-go/Dockerfile b/bldr-imgs/bldr-ubuntu22-c-go/Dockerfile
new file mode 100644 (file)
index 0000000..3f092c0
--- /dev/null
@@ -0,0 +1,98 @@
+# O-RAN-SC
+#
+# Copyright (C) 2019-2020 AT&T Intellectual Property and Nokia
+# Copyright (C) 2023 Abhijit Gadgil.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Builder image with superset of CI tools for RIC components
+
+FROM nexus3.o-ran-sc.org:10001/ubuntu:22.04
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update && apt-get install -y \
+    alien \
+    autoconf \
+    autoconf-archive \
+    automake \
+    autotools-dev \
+    build-essential \
+    cmake \
+    g++  \
+    gcc \
+    git \
+    ksh \
+    libbz2-dev \
+    libicu-dev \
+    libsctp-dev \
+    libtool \
+    lksctp-tools \
+    make \
+    python3-dev \
+    pkg-config \
+    software-properties-common \
+    sudo \
+    wget \
+    zlib1g \
+    zlib1g-dev \
+    zip \
+    libboost-all-dev
+
+WORKDIR /tmp
+
+# Install go versions in /opt
+RUN mkdir -p /opt/go
+
+
+ARG g18="1.18.10"
+RUN wget -nv https://dl.google.com/go/go${g18}.linux-amd64.tar.gz \
+    && tar -xf go${g18}.linux-amd64.tar.gz \
+    && mv go /opt/go/1.18 \
+    && rm -f go*.gz
+
+ARG g19="1.19.12"
+RUN wget -nv https://dl.google.com/go/go${g19}.linux-amd64.tar.gz \
+    && tar -xf go${g19}.linux-amd64.tar.gz \
+    && mv go /opt/go/1.19 \
+    && rm -f go*.gz
+
+ARG g20="1.20.7"
+RUN wget -nv https://dl.google.com/go/go${g20}.linux-amd64.tar.gz \
+    && tar -xf go${g20}.linux-amd64.tar.gz \
+    && mv go /opt/go/1.20 \
+    && rm -f go*.gz
+
+# Use /opt/go/1.18/bin for version 1.18.x (default)
+ARG GOVERSION=1.18
+ENV GOPATH=/root/go
+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:$GOPATH/bin
+
+# This installs go-acc to GOPATH
+RUN go version; \
+    export GOBIN=/usr/local/bin/; export GO111MODULE=on;\
+    go install github.com/ory/go-acc@master \
+    && go-acc --help
+
+
+# sonar-scanner is not available in ubuntu repo
+ARG sv="4.8.0.2856"
+RUN wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${sv}-linux.zip \
+    && unzip sonar-scanner-cli-${sv}-linux.zip \
+    && mv sonar-scanner-${sv}-linux /usr/local/sonar-scanner \
+    && rm -f sonar*.zip
+
+# golangci-lint is not available in ubuntu repo
+RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.53.3 \
+    && rm -f install.sh
diff --git a/bldr-imgs/bldr-ubuntu22-c-go/container-tag.yaml b/bldr-imgs/bldr-ubuntu22-c-go/container-tag.yaml
new file mode 100644 (file)
index 0000000..b7f1285
--- /dev/null
@@ -0,0 +1,8 @@
+# Not feasible to show all the software versions
+# here so just use a counter plus the base image
+# Sincce this is still experimental, we are using
+# the tag of 0.1.0. when we have enough testing
+# and there is confidence that the images can be
+# built with Ubuntu 22.04, we shall make it 1.0.0
+---
+tag: 0.1.0