Fixes for Docker build
- add runtime dependency on git
- set ONOS_ROOT before doing build
- Add top level directory to grpc proto compiler include directories
Change-Id: I6e7a119a122f708988cce28090c9bc7011808b78
diff --git a/Dockerfile b/Dockerfile
index 420074c..ed5242d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -18,10 +18,14 @@
COPY . /src/onos/
# Build ONOS
+# FIXME - dependence on ONOS_ROOT and git at build time is a hack to work around
+# build problems
WORKDIR /src
RUN apt-get update && \
- apt-get install -y python less zip curl oracle-java8-installer oracle-java8-set-default ssh && \
+ apt-get install -y python less zip curl oracle-java8-installer oracle-java8-set-default ssh git && \
cd onos && \
+ ONOS_ROOT=/src/onos && \
+ export ONOS_ROOT && \
tools/build/onos-buck build onos && \
cp buck-out/gen/tools/package/onos-package/onos.tar.gz /tmp/ && \
cd .. && \
diff --git a/protocols/grpc/proto/BUCK b/protocols/grpc/proto/BUCK
index b1be821..f4a4033 100644
--- a/protocols/grpc/proto/BUCK
+++ b/protocols/grpc/proto/BUCK
@@ -15,7 +15,7 @@
grpc_jar(
proto_match_patterns = ["*.proto"],
- proto_paths = ["$ONOS_ROOT/protocols/grpc/proto/"],
+ proto_paths = ["$ONOS_ROOT/protocols/grpc/proto/", "$ONOS_ROOT"], #FIXME should not have to include ONOS_ROOT top level here
protoc_version = PROTOC_VER,
plugin_version = GRPC_VER,
deps = COMPILE_DEPS,
@@ -23,4 +23,4 @@
project_config(
src_target = ':onos-protocols-grpc-proto'
-)
\ No newline at end of file
+)