[VOL-2993] Using a single Dockerfile for images with and without profiling
 Adding environment variable support to easily build profiled image

Change-Id: Ic09f71702e1e2007b321e5e76b5785bb31170420
diff --git a/docker/Dockerfile.openolt b/docker/Dockerfile.openolt
index ded4efa..e78ec06 100644
--- a/docker/Dockerfile.openolt
+++ b/docker/Dockerfile.openolt
@@ -24,6 +24,8 @@
 WORKDIR /go/src/github.com/opencord/voltha-openolt-adapter
 COPY . .
 
+ARG EXTRA_GO_BUILD_TAGS=""
+
 ARG org_label_schema_version=unknown
 ARG org_label_schema_vcs_url=unknown
 ARG org_label_schema_vcs_ref=unknown
@@ -33,7 +35,7 @@
 
 # Build openolt
 SHELL ["/bin/ash", "-o", "pipefail", "-c"]
-RUN go build -mod=vendor -o /go/bin/openolt \
+RUN go build $EXTRA_GO_BUILD_TAGS -mod=vendor -o /go/bin/openolt \
 	-ldflags \
 	"-X github.com/opencord/voltha-lib-go/v3/pkg/version.version=$org_label_schema_version \
 	 -X github.com/opencord/voltha-lib-go/v3/pkg/version.vcsRef=$org_label_schema_vcs_ref  \