blob: 57843bfe353a42e6baabb3d73e98f3176a59efdb [file] [log] [blame]
David K. Bainbridge10a7a7e2018-01-29 09:54:40 -08001# Copyright 2018 the original author or authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14ARG REGISTRY=
15ARG REPOSITORY=
16ARG TAG=latest
17ARG HTTP_PROXY=
18ARG HTTPS_PROXY=
19
20FROM grpc/python as protos
21COPY voltha/protos/*.proto /voltha/protos/
22COPY voltha/protos/third_party/google/api/*.proto /voltha/protos/third_party/google/api/
23#RUN protoc -I/voltha/protos -I/voltha/protos/third_party --include_imports --include_source_info --descriptor_set_out=/proto.pb /voltha/protos/*.proto
24RUN python -m grpc.tools.protoc -I/voltha/protos -I/voltha/protos/third_party --include_imports --include_source_info --descriptor_set_out=/proto.pb /voltha/protos/*.proto
25
26FROM ${REGISTRY}${REPOSITORY}voltha-go-builder:${TAG} as build
27ENV http_proxy ${HTTP_PROXY}
28ENV https_proxy ${HTTPS_PROXY}
29
30COPY envoy/go/envoyd/*.go /src/
31RUN mkdir /output
32RUN OUTPUT=/ /build.sh
33RUN ls /output
34
35FROM lyft/envoy:29361deae91575a1d46c7a21e913f19e75622ebe
36
37RUN apt-get update && apt-get -q install -y curl
38COPY envoy/front-proxy /envoy
39COPY --from=protos /proto.pb /envoy/
40COPY pki /envoy/
41COPY --from=build /envoyd /usr/local/bin/envoyd
42
43CMD /usr/local/bin/envoy -c /envoy/front-proxy/voltha-grpc-proxy.json