Fixed build error on Dockerfile witht the LOCAL_PROTOS or LOCAL_PYVOLTHA flags, while keeping it passing with docker lint
Change-Id: Ia2ef797598c308b58a640e85edc17f47150e30af
diff --git a/python/docker/Dockerfile.adapter_ponsim_olt b/python/docker/Dockerfile.adapter_ponsim_olt
index de1851f..75f135c 100644
--- a/python/docker/Dockerfile.adapter_ponsim_olt
+++ b/python/docker/Dockerfile.adapter_ponsim_olt
@@ -42,11 +42,15 @@
ARG LOCAL_PROTOS
COPY local_imports/ /local_imports/
RUN if [ -n "$LOCAL_PYVOLTHA" ] ; then \
- pip install /local_imports/pyvoltha/dist/*.tar.gz==* ; \
+ PYVOLTHA_PATH=$(ls /local_imports/pyvoltha/dist/) ; \
+ printf "/local_imports/pyvoltha/dist/%s\npyvoltha" "$PYVOLTHA_PATH" > pyvoltha-install.txt ; \
+ pip install -r pyvoltha-install.txt ; \
fi
RUN if [ -n "$LOCAL_PROTOS" ] ; then \
- pip install /local_imports/voltha-protos/dist/*.tar.gz==* ; \
+ PROTOS_PATH=$(ls /local_imports/voltha-protos/dist/) ; \
+ printf "/local_imports/voltha-protos/dist/%s\nvoltha-protos" "$PROTOS_PATH" > protos-install.txt ; \
+ pip install -r protos-install.txt ; \
fi
# Bundle app source