Split Dockerfile in anticipation of rest-gateway
diff --git a/Dockerfile b/Dockerfile.base
similarity index 90%
rename from Dockerfile
rename to Dockerfile.base
index c6b17fb..5e1601f 100644
--- a/Dockerfile
+++ b/Dockerfile.base
@@ -34,9 +34,3 @@
     apt-get purge -y wget build-essential make gcc binutils python-dev libffi-dev libssl-dev git && \
     apt-get autoremove -y
 
-# Bundle app source
-COPY voltha /voltha
-
-# Exposing process and default entry point
-# EXPOSE 8000
-CMD ["python", "voltha/main.py"]
diff --git a/Dockerfile.alpine b/Dockerfile.base.alpine
similarity index 100%
rename from Dockerfile.alpine
rename to Dockerfile.base.alpine
diff --git a/Dockerfile b/Dockerfile.voltha
similarity index 63%
copy from Dockerfile
copy to Dockerfile.voltha
index c6b17fb..4783d64 100644
--- a/Dockerfile
+++ b/Dockerfile.voltha
@@ -15,25 +15,12 @@
 # limitations under the License.
 #
 
-FROM ubuntu:xenial
+FROM cord/voltha-base
 
 MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
 MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
 MAINTAINER Nathan Knuth   <nathan.knuth@tibitcom.com>
 
-# Update to have latest images
-RUN apt-get update && \
-    apt-get install -y python python-pip openssl
-
-COPY requirements.txt /tmp/requirements.txt
-
-# pip install cython enum34 six && \
-# Install app dependencies
-RUN apt-get install -y wget build-essential make gcc binutils python-dev libffi-dev libssl-dev git && \
-    pip install -r /tmp/requirements.txt && \
-    apt-get purge -y wget build-essential make gcc binutils python-dev libffi-dev libssl-dev git && \
-    apt-get autoremove -y
-
 # Bundle app source
 COPY voltha /voltha
 
diff --git a/Makefile b/Makefile
index a85f749..b7de7c3 100644
--- a/Makefile
+++ b/Makefile
@@ -72,8 +72,14 @@
 	@echo "utest        : Run all unit tests"
 	@echo
 
-build: utest build-protos
-	docker build -t cord/voltha -f Dockerfile .
+build: utest build-protos docker-base
+	docker build -t cord/voltha -f Dockerfile.voltha .
+
+docker-base: .docker-base-built
+
+.docker-base-built: Dockerfile.base Makefile requirements.txt
+	docker build -t cord/voltha-base -f Dockerfile.base .
+	touch .docker-base-built
 
 build-protos:
 	make -C voltha/core/protos
diff --git a/voltha/core/protos/voltha.desc b/voltha/core/protos/voltha.desc
index b1755ef..035cafb 100644
--- a/voltha/core/protos/voltha.desc
+++ b/voltha/core/protos/voltha.desc
Binary files differ
diff --git a/voltha/main.py b/voltha/main.py
index 43a57e8..d4eda83 100755
--- a/voltha/main.py
+++ b/voltha/main.py
@@ -24,7 +24,9 @@
 import yaml
 from twisted.internet.defer import inlineCallbacks
 
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+sys.path.append(base_dir)
+sys.path.append(os.path.join(base_dir, '/voltha/core/protos/third_party'))
 
 from voltha.coordinator import Coordinator
 from voltha.dockerhelpers import get_my_containers_name