3 # Copyright (C) 2019-2020 AT&T Intellectual Property and Nokia
4 # Copyright (C) 2023 Abhijit Gadgil.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # Builder image with superset of CI tools for RIC components
20 FROM nexus3.o-ran-sc.org:10001/ubuntu:22.04
22 ARG DEBIAN_FRONTEND=noninteractive
24 RUN apt-get update && apt-get install -y \
44 software-properties-common \
54 # Install go versions in /opt
59 RUN wget -nv https://dl.google.com/go/go${g18}.linux-amd64.tar.gz \
60 && tar -xf go${g18}.linux-amd64.tar.gz \
61 && mv go /opt/go/1.18 \
65 RUN wget -nv https://dl.google.com/go/go${g19}.linux-amd64.tar.gz \
66 && tar -xf go${g19}.linux-amd64.tar.gz \
67 && mv go /opt/go/1.19 \
71 RUN wget -nv https://dl.google.com/go/go${g20}.linux-amd64.tar.gz \
72 && tar -xf go${g20}.linux-amd64.tar.gz \
73 && mv go /opt/go/1.20 \
76 # Use /opt/go/1.18/bin for version 1.18.x (default)
79 ENV DEFAULTPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
80 ENV PATH=$DEFAULTPATH:/usr/local/go/bin:/opt/go/${GOVERSION}/bin:$GOPATH/bin
82 # This installs go-acc to GOPATH
84 export GOBIN=/usr/local/bin/; export GO111MODULE=on;\
85 go install github.com/ory/go-acc@master \
89 # sonar-scanner is not available in ubuntu repo
91 RUN wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${sv}-linux.zip \
92 && unzip sonar-scanner-cli-${sv}-linux.zip \
93 && mv sonar-scanner-${sv}-linux /usr/local/sonar-scanner \
96 # golangci-lint is not available in ubuntu repo
97 RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.53.3 \