VOL-1500 VOL-1475 Updated the remaining python containers in voltha-go to use pyvoltha and voltha-protos
Changed the build system to have separate flags for local pyvoltha and local protos.
Cleared out now unneeded python libraries and protos from voltha-go
PonSim was tested by launching the system-test-ponsim.yml and making sure the ponsim enables.
This was tested on docker-compose and k8s.
Let me know if there are other cases to test.
Change-Id: Ie2d5a19900fcfc93b96aba2981efb18fd9e649bb
diff --git a/python/docker/Dockerfile.ofagent b/python/docker/Dockerfile.ofagent
index dee28ed..564da05 100644
--- a/python/docker/Dockerfile.ofagent
+++ b/python/docker/Dockerfile.ofagent
@@ -15,35 +15,17 @@
ARG REGISTRY=
ARG REPOSITORY=
-FROM ${REGISTRY}${REPOSITORY}voltha-protos:${TAG} as protos
FROM ${REGISTRY}${REPOSITORY}voltha-base:${TAG}
MAINTAINER Voltha Community <info@opennetworking.org>
-# Install protoc version 3.0.0; this is not yet the supported
-# version on xenial, so we need to "backport" it
-RUN apt-get update && \
- apt-get install -y zlib1g-dev wget && \
- wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotoc10_3.0.0-9_amd64.deb && \
- wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf-lite10_3.0.0-9_amd64.deb && \
- wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf-dev_3.0.0-9_amd64.deb && \
- wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf10_3.0.0-9_amd64.deb && \
- wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/protobuf-compiler_3.0.0-9_amd64.deb && \
- dpkg -i *.deb && \
- protoc --version && \
- rm -f *.deb
-
# Bundle app source
-RUN mkdir -p /ofagent/ofagent/protos/third_party/google/api && \
- touch /ofagent/__init__.py \
- /ofagent/ofagent/protos/third_party/google/__init__.py \
- /ofagent/ofagent/protos/third_party/google/api/__init__.py
+RUN mkdir /ofagent && \
+ touch /ofagent/__init__.py
+
ENV PYTHONPATH=/ofagent
-COPY common /ofagent/common
COPY ofagent /ofagent/ofagent
COPY pki /ofagent/pki
-COPY --from=protos /protos/voltha /ofagent/ofagent/protos
-COPY --from=protos /protos/google/api /ofagent/ofagent/protos/third_party/google/api
ENTRYPOINT ["/usr/bin/dumb-init", "--"]