Using the same dockerfile as openolt-adapter
Change-Id: I15510bf698d9bf23d64e380fa3518419ad5bc757
diff --git a/docker/Dockerfile.openonu b/docker/Dockerfile.openonu
index 76b1851..7aa3f0a 100644
--- a/docker/Dockerfile.openonu
+++ b/docker/Dockerfile.openonu
@@ -17,8 +17,11 @@
FROM golang:1.13.8-alpine3.11 AS build-env
+# Install required packages
+RUN apk add --no-cache build-base=0.5-r1
+
# Prepare directory structure
-WORKDIR /go/src
+WORKDIR /go/src/github.com/opencord/voltha-openonu-adapter-go
# Copy common files.
COPY . .
@@ -32,8 +35,6 @@
# 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 github.com/opencord/voltha-lib-go/v3/pkg/version.version=$org_label_schema_version \
@@ -43,7 +44,7 @@
-X github.com/opencord/voltha-lib-go/v3/pkg/version.os=$(go env GOHOSTOS) \
-X github.com/opencord/voltha-lib-go/v3/pkg/version.arch=$(go env GOHOSTARCH) \
-X github.com/opencord/voltha-lib-go/v3/pkg/version.buildTime=$org_label_schema_build_date" \
- cmd/openonu-adapter/main.go cmd/openonu-adapter/main_test.go cmd/openonu-adapter/common.go cmd/openonu-adapter/profile.go
+ ./cmd/openonu-adapter/
# -------------
# Image creation stage
@@ -72,5 +73,3 @@
org.label-schema.build-date=$org_label_schema_build_date \
org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
org.opencord.vcs-dirty=$org_opencord_vcs_dirty
-
-ENTRYPOINT [ "/app/openonu" ]