WIP [VOL-2811] - Incorporate preliminary onu-adapter-go code into opencord repo
- reason "discovery-mibsync-complete" reached (via full MibUpload only, received data won't be stored yet)
- first review comments of patchset #4 considered
(please have a look into our inline-comments in Gerrit to know more about the current state)
- no refactoring done yet
Change-Id: Iac47817f8ce4bd28dd8132f530b0570d57ae99b8
Signed-off-by: Holger Hildebrandt <holger.hildebrandt@adtran.com>
diff --git a/docker/Dockerfile.openonu b/docker/Dockerfile.openonu
index 1d693ea..dba6602 100644
--- a/docker/Dockerfile.openonu
+++ b/docker/Dockerfile.openonu
@@ -21,12 +21,7 @@
WORKDIR /go/src
# Copy common files.
-COPY vendor ./vendor
-
-# Copy files
-COPY cmd ./cmd
-COPY go.mod ./
-COPY go.sum ./
+COPY . .
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
@@ -38,6 +33,7 @@
# Build openonu
SHELL ["/bin/ash", "-o", "pipefail", "-c"]
ENV GO111MODULE=on
+ENV CGO_ENABLED=0
RUN go build -mod=vendor -o /go/bin/openonu \
-ldflags \
"-X test.internal/openadapter/config/version.version=$org_label_schema_version \
@@ -46,8 +42,8 @@
-X test.internal/openadapter/config/version.goVersion=$(go version 2>&1 | sed -E 's/.*go([0-9]+\.[0-9]+\.[0-9]+).*/\1/g') \
-X test.internal/openadapter/config/version.os=$(go env GOHOSTOS) \
-X test.internal/openadapter/config/version.arch=$(go env GOHOSTARCH) \
- -X test.internal/openadapter/config/version.buildTime=$org_label_schema_build_date" \
- ./cmd/openonu.go
+ -X test.internal/openadapter/config/version.buildTime=$org_label_schema_build_date" \
+ ./main.go
# -------------
# Image creation stage