David K. Bainbridge | da61772 | 2018-01-29 09:54:40 -0800 | [diff] [blame] | 1 | # 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. |
| 14 | ARG REGISTRY= |
| 15 | ARG REPOSITORY= |
| 16 | ARG TAG=latest |
| 17 | ARG HTTP_PROXY= |
| 18 | ARG HTTPS_PROXY= |
| 19 | |
| 20 | FROM grpc/python as protos |
| 21 | COPY voltha/protos/*.proto /voltha/protos/ |
| 22 | COPY 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 |
| 24 | RUN 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 | |
| 26 | FROM ${REGISTRY}${REPOSITORY}voltha-go-builder:${TAG} as build |
| 27 | ENV http_proxy ${HTTP_PROXY} |
| 28 | ENV https_proxy ${HTTPS_PROXY} |
| 29 | |
| 30 | COPY envoy/go/envoyd/*.go /src/ |
| 31 | RUN mkdir /output |
| 32 | RUN OUTPUT=/ /build.sh |
| 33 | RUN ls /output |
| 34 | |
| 35 | FROM lyft/envoy:29361deae91575a1d46c7a21e913f19e75622ebe |
| 36 | |
| 37 | RUN apt-get update && apt-get -q install -y curl |
| 38 | COPY envoy/front-proxy /envoy |
| 39 | COPY --from=protos /proto.pb /envoy/ |
| 40 | COPY pki /envoy/ |
| 41 | COPY --from=build /envoyd /usr/local/bin/envoyd |
| 42 | |
| 43 | CMD /usr/local/bin/envoy -c /envoy/front-proxy/voltha-grpc-proxy.json |