enable profile and race detection builds

Change-Id: I7177ea7ad2ea55c400ebb9ca9b3f7e7e1f82ae33
diff --git a/docker/Dockerfile.ofagent-go b/docker/Dockerfile.ofagent-go
index 09bbf4c..d4002bd 100644
--- a/docker/Dockerfile.ofagent-go
+++ b/docker/Dockerfile.ofagent-go
@@ -17,11 +17,16 @@
 
 FROM --platform=linux/amd64 golang:1.16.3-alpine3.13 AS dev
 
+# Install required packages
+RUN apk add --no-cache build-base=0.5-r2
+
 WORKDIR /go/src
 COPY . .
 
 ARG EXTRA_GO_BUILD_TAGS=""
 
+ARG CGO_PARAMETER="0"
+
 ARG org_label_schema_version=unknown
 ARG org_label_schema_vcs_url=unknown
 ARG org_label_schema_vcs_ref=unknown
@@ -32,7 +37,7 @@
 # Build
 SHELL ["/bin/ash", "-o", "pipefail", "-c"]
 RUN \
-CGO_ENABLED=0 go build $EXTRA_GO_BUILD_TAGS -mod=vendor -o /app/ofagent \
+CGO_ENABLED=$CGO_PARAMETER go build $EXTRA_GO_BUILD_TAGS -mod=vendor -o /app/ofagent \
 -ldflags \
 "-X github.com/opencord/voltha-lib-go/v2/pkg/version.version=$org_label_schema_version \
 -X github.com/opencord/voltha-lib-go/v2/pkg/version.vcsRef=$org_label_schema_vcs_ref \