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