From: Juha Hyttinen Date: Fri, 1 Oct 2021 09:09:54 +0000 (+0300) Subject: ubuntu20 based bldr image X-Git-Tag: 1.0.0^0 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=7c17088822038307f646efb70a29489d201bb493;p=it%2Fdev.git ubuntu20 based bldr image “This in order for the near-RT RIC project to be able to use the updated Ubuntu release” Issue-Id: RIC-676 Signed-off-by: Juha Hyttinen Change-Id: I02fe16955f31701089a148d20c81a314adc45884 --- diff --git a/bldr-imgs/bldr-ubuntu20-c-go/Dockerfile b/bldr-imgs/bldr-ubuntu20-c-go/Dockerfile new file mode 100644 index 0000000..8ddeb23 --- /dev/null +++ b/bldr-imgs/bldr-ubuntu20-c-go/Dockerfile @@ -0,0 +1,93 @@ +# O-RAN-SC +# +# Copyright (C) 2019-2020 AT&T Intellectual Property and Nokia +# +# 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:20.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 \ + python-dev \ + pkg-config \ + software-properties-common \ + sudo \ + wget \ + zlib1g \ + zlib1g-dev \ + zlibc \ + zip \ + libboost-all-dev + +WORKDIR /tmp + +# Install go versions in /opt +RUN mkdir -p /opt/go + + +ARG g16="1.16.4" +RUN wget -nv https://dl.google.com/go/go${g16}.linux-amd64.tar.gz \ + && tar -xf go${g16}.linux-amd64.tar.gz \ + && mv go /opt/go/1.16 \ + && rm -f go*.gz + +ARG g17="1.17.1" +RUN wget -nv https://dl.google.com/go/go${g17}.linux-amd64.tar.gz \ + && tar -xf go${g17}.linux-amd64.tar.gz \ + && mv go /opt/go/1.17 \ + && rm -f go*.gz + +# Default path has go version 1.16.x +# Use /opt/go/1.16/bin for version 1.16.x +# Use /opt/go/1.17/bin for version 1.17.x +ARG GOVERSION=1.16 +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 get -v github.com/ory/go-acc \ + && go-acc --help + +# sonar-scanner is not available in ubuntu repo +ARG sv="4.2.0.1873" +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.23.6 \ + && rm -f install.sh diff --git a/bldr-imgs/bldr-ubuntu20-c-go/container-tag.yaml b/bldr-imgs/bldr-ubuntu20-c-go/container-tag.yaml new file mode 100644 index 0000000..41f4a30 --- /dev/null +++ b/bldr-imgs/bldr-ubuntu20-c-go/container-tag.yaml @@ -0,0 +1,4 @@ +# Not feasible to show all the software versions +# here so just use a counter plus the base image +--- +tag: 1.0.0