David K. Bainbridge | 10a7a7e | 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 | |
| 15 | ARG REGISTRY= |
| 16 | ARG PROTOC_PREFIX=/usr/local |
| 17 | ARG ROTOC_LIBDIR=${PROTOC_PREFIX}/lib |
| 18 | ARG PROTOC=${PROTOC_PREFIX}/bin/protoc |
| 19 | ARG PROTOC_VERSION=3.3.0 |
| 20 | |
| 21 | FROM ${REGISTRY}debian:stretch-slim |
| 22 | MAINTAINER Voltha Community <info@opennetworking.org> |
| 23 | |
| 24 | ENV PROTOC_PREFIX=/usr/local |
| 25 | ENV ROTOC_LIBDIR=${PROTOC_PREFIX}/lib |
| 26 | ENV PROTOC=${PROTOC_PREFIX}/bin/protoc |
| 27 | ENV PROTOC_VERSION=3.3.0 |
| 28 | ENV PROTOC_DOWNLOAD_PREFIX=https://github.com/google/protobuf/releases/download |
| 29 | ENV PROTOC_DIR=protobuf-${PROTOC_VERSION} |
| 30 | ENV PROTOC_TARBALL=protobuf-python-${PROTOC_VERSION}.tar.gz |
| 31 | ENV PROTOC_DOWNLOAD_URI=${PROTOC_DOWNLOAD_PREFIX}/v${PROTOC_VERSION}/${PROTOC_TARBALL} |
| 32 | |
| 33 | RUN apt-get update -y && apt-get install -y wget build-essential python-dev python-pip |
Jonathan Hart | 0c84ecd | 2018-04-27 13:02:18 -0700 | [diff] [blame] | 34 | RUN pip install grpcio-tools==1.3.5 |
David K. Bainbridge | 10a7a7e | 2018-01-29 09:54:40 -0800 | [diff] [blame] | 35 | WORKDIR /build |
| 36 | RUN wget -q --no-check-certificate ${PROTOC_DOWNLOAD_URI} |
| 37 | RUN tar --strip-components=1 -zxf ${PROTOC_TARBALL} |
| 38 | RUN ./configure --prefix=${PROTOC_PREFIX} |
| 39 | RUN make install |