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