VOL-3978 - update to latest go version

Change-Id: I6e3098dcf2f95b1cda4a3fb43979abc92d5bd530
diff --git a/Makefile b/Makefile
index da3e021..15664eb 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@
 VERSION                         ?= $(shell cat ./VERSION)
 GO_JUNIT_REPORT_VERSION         ?= "0.9.1"
 GOCOVER_COBERTURA_VERSION       ?= "v0.0.0-20180217150009-aaee18c8195c"
-GOLANG_VERSION                  ?= "1.13.9"
+GOLANG_VERSION                  ?= "1.16.3"
 GOLANGCI_LINT_VERSION           ?= "1.23.6"
 HADOLINT_VERSION                ?= "1.17.5"
 PROTOC_VERSION                  ?= "3.7.0"
@@ -31,13 +31,13 @@
 DOCKER_LABEL_VCS_DIRTY     = false
 ifneq ($(shell git status --porcelain | wc -l | sed -e 's/ //g'),0)
     DOCKER_LABEL_VCS_DIRTY = true
-    VERSION                = latest
 endif
 
 DOCKER                     ?= docker
 DOCKER_EXTRA_ARGS          ?=
 DOCKER_REGISTRY            ?=
 DOCKER_REPOSITORY          ?= voltha/
+DOCKER_TAG                 ?= ${VERSION}$(shell [[ ${DOCKER_LABEL_VCS_DIRTY} == "true" ]] && echo "-dirty" || true)
 IMAGENAME                  := ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}voltha-ci-tools
 
 ## Docker labels. Only set ref and commit date if committed
@@ -72,8 +72,9 @@
 
 go-junit-report:
 	${DOCKER} build ${DOCKER_BUILD_ARGS} \
+	--build-arg GOLANG_VERSION=${GOLANG_VERSION} \
 	--build-arg GO_JUNIT_REPORT_VERSION=${GO_JUNIT_REPORT_VERSION} \
-	-t ${IMAGENAME}:${VERSION}-go-junit-report \
+	-t ${IMAGENAME}:${DOCKER_TAG}-go-junit-report \
 	-t ${IMAGENAME}:latest-go-junit-report \
 	-f docker/go-junit-report.Dockerfile .
 
@@ -81,50 +82,51 @@
 	${DOCKER} build ${DOCKER_BUILD_ARGS} \
 	--build-arg GOLANG_VERSION=${GOLANG_VERSION} \
 	--build-arg GOCOVER_COBERTURA_VERSION=${GOCOVER_COBERTURA_VERSION} \
-	-t ${IMAGENAME}:${VERSION}-gocover-cobertura \
+	-t ${IMAGENAME}:${DOCKER_TAG}-gocover-cobertura \
 	-t ${IMAGENAME}:latest-gocover-cobertura \
 	-f docker/gocover-cobertura.Dockerfile .
 
 golang:
 	${DOCKER} build ${DOCKER_BUILD_ARGS} \
 	--build-arg GOLANG_VERSION=${GOLANG_VERSION} \
-	-t ${IMAGENAME}:${VERSION}-golang \
+	-t ${IMAGENAME}:${DOCKER_TAG}-golang \
 	-t ${IMAGENAME}:latest-golang \
 	-f docker/golang.Dockerfile .
 
 python:
 	${DOCKER} build ${DOCKER_BUILD_ARGS} \
-	-t ${IMAGENAME}:${VERSION}-python \
+	-t ${IMAGENAME}:${DOCKER_TAG}-python \
 	-t ${IMAGENAME}:latest-python \
 	-f docker/python.Dockerfile .
 
 golangci-lint:
 	${DOCKER} build ${DOCKER_BUILD_ARGS} \
 	--build-arg GOLANGCI_LINT_VERSION=${GOLANGCI_LINT_VERSION} \
-	-t ${IMAGENAME}:${VERSION}-golangci-lint \
+	-t ${IMAGENAME}:${DOCKER_TAG}-golangci-lint \
 	-t ${IMAGENAME}:latest-golangci-lint \
 	-f docker/golangci-lint.Dockerfile .
 
 hadolint:
 	${DOCKER} build ${DOCKER_BUILD_ARGS} \
     --build-arg HADOLINT_VERSION=${HADOLINT_VERSION} \
-    -t ${IMAGENAME}:${VERSION}-hadolint \
+    -t ${IMAGENAME}:${DOCKER_TAG}-hadolint \
     -t ${IMAGENAME}:latest-hadolint \
     -f docker/hadolint.Dockerfile .
 
 protoc:
 	${DOCKER} build ${DOCKER_BUILD_ARGS} \
+	--build-arg GOLANG_VERSION=${GOLANG_VERSION} \
 	--build-arg PROTOC_VERSION=${PROTOC_VERSION} \
 	--build-arg PROTOC_SHA256SUM=${PROTOC_SHA256SUM} \
 	--build-arg PROTOC_GEN_GO_VERSION=${PROTOC_GEN_GO_VERSION} \
 	--build-arg PROTOC_GEN_GRPC_GATEWAY_VERSION=${PROTOC_GEN_GRPC_GATEWAY_VERSION} \
-	-t ${IMAGENAME}:${VERSION}-protoc \
+	-t ${IMAGENAME}:${DOCKER_TAG}-protoc \
 	-t ${IMAGENAME}:latest-protoc \
 	-f docker/protoc.Dockerfile .
 
 onos-config-loader:
 	${DOCKER} build ${DOCKER_BUILD_ARGS} \
-	-t ${IMAGENAME}:${VERSION}-onos-config-loader \
+	-t ${IMAGENAME}:${DOCKER_TAG}-onos-config-loader \
 	-t ${IMAGENAME}:latest-onos-config-loader \
 	-f docker/onos-config-loader.Dockerfile .
 
@@ -133,11 +135,11 @@
 	@echo "Local repo is dirty.  Refusing to push."
 	@exit 1
 endif
-	${DOCKER} push ${IMAGENAME}:${VERSION}-go-junit-report
-	${DOCKER} push ${IMAGENAME}:${VERSION}-gocover-cobertura
-	${DOCKER} push ${IMAGENAME}:${VERSION}-golang
-	${DOCKER} push ${IMAGENAME}:${VERSION}-golangci-lint
-	${DOCKER} push ${IMAGENAME}:${VERSION}-hadolint
-	${DOCKER} push ${IMAGENAME}:${VERSION}-protoc
-	${DOCKER} push ${IMAGENAME}:${VERSION}-python
-	${DOCKER} push ${IMAGENAME}:${VERSION}-onos-config-loader
+	${DOCKER} push ${IMAGENAME}:${DOCKER_TAG}-go-junit-report
+	${DOCKER} push ${IMAGENAME}:${DOCKER_TAG}-gocover-cobertura
+	${DOCKER} push ${IMAGENAME}:${DOCKER_TAG}-golang
+	${DOCKER} push ${IMAGENAME}:${DOCKER_TAG}-golangci-lint
+	${DOCKER} push ${IMAGENAME}:${DOCKER_TAG}-hadolint
+	${DOCKER} push ${IMAGENAME}:${DOCKER_TAG}-protoc
+	${DOCKER} push ${IMAGENAME}:${DOCKER_TAG}-python
+	${DOCKER} push ${IMAGENAME}:${DOCKER_TAG}-onos-config-loader
diff --git a/VERSION b/VERSION
index 0bee604..197c4d5 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.3.3
+2.4.0
diff --git a/docker/go-junit-report.Dockerfile b/docker/go-junit-report.Dockerfile
index 7104498..d2a5f3a 100644
--- a/docker/go-junit-report.Dockerfile
+++ b/docker/go-junit-report.Dockerfile
@@ -12,9 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM golang:1.13.9-alpine as build
+ARG GOLANG_VERSION
+FROM golang:$GOLANG_VERSION-alpine as build
 
-RUN apk add --no-cache build-base=0.5-r1
+RUN apk add --no-cache build-base=0.5-r2
 
 # download & compile this specific version of go-junit-report
 ARG GO_JUNIT_REPORT_VERSION
diff --git a/docker/gocover-cobertura.Dockerfile b/docker/gocover-cobertura.Dockerfile
index 21d59fd..62e1d14 100644
--- a/docker/gocover-cobertura.Dockerfile
+++ b/docker/gocover-cobertura.Dockerfile
@@ -14,7 +14,7 @@
 ARG GOLANG_VERSION
 FROM golang:$GOLANG_VERSION-alpine as build
 
-RUN apk add --no-cache build-base=0.5-r1
+RUN apk add --no-cache build-base=0.5-r2
 
 # download & compile this specific version of gocover-cobertura
 ARG GOCOVER_COBERTURA_VERSION
diff --git a/docker/golang.Dockerfile b/docker/golang.Dockerfile
index 0cfa9ec..519d500 100644
--- a/docker/golang.Dockerfile
+++ b/docker/golang.Dockerfile
@@ -15,7 +15,7 @@
 ARG GOLANG_VERSION
 FROM golang:$GOLANG_VERSION-alpine
 
-RUN apk add --no-cache git=2.24.4-r0 && \
+RUN apk add --no-cache git=2.30.2-r0 && \
     mkdir -m 777 /.cache /go/pkg
 
 ENV GO111MODULE=on CGO_ENABLED=0
diff --git a/docker/protoc.Dockerfile b/docker/protoc.Dockerfile
index a7526bc..c71c465 100644
--- a/docker/protoc.Dockerfile
+++ b/docker/protoc.Dockerfile
@@ -12,14 +12,15 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM golang:1.13.9-alpine as build
+ARG GOLANG_VERSION
+FROM golang:$GOLANG_VERSION-alpine as build
 
 ARG PROTOC_VERSION
 ARG PROTOC_SHA256SUM
 ARG PROTOC_GEN_GO_VERSION
 ARG PROTOC_GEN_GRPC_GATEWAY_VERSION
 
-RUN apk add --no-cache libatomic=9.3.0-r0 musl=1.1.24-r2
+RUN apk add --no-cache libatomic=10.2.1_pre1-r3 musl=1.2.2-r0
 
 # download & compile this specific version of protoc-gen-go
 RUN GO111MODULE=on CGO_ENABLED=0 go get -u \