From c35f830fd8450974e36df4c159dc82abbde61ab5 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Tue, 27 Nov 2018 17:07:26 -0800 Subject: [PATCH] A script to compile protoc plugin --- .../gateway/docker/protoc_plugin/Dockerfile | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 net/grpc/gateway/docker/protoc_plugin/Dockerfile diff --git a/net/grpc/gateway/docker/protoc_plugin/Dockerfile b/net/grpc/gateway/docker/protoc_plugin/Dockerfile new file mode 100644 index 00000000..fbe3a2f5 --- /dev/null +++ b/net/grpc/gateway/docker/protoc_plugin/Dockerfile @@ -0,0 +1,43 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ubuntu:14.04 + +ARG MAKEFLAGS=-j8 + +RUN apt-get update && apt-get install -y \ + autoconf \ + automake \ + build-essential \ + curl \ + git \ + libtool \ + libpcre3-dev \ + libssl-dev \ + make \ + software-properties-common \ + zip + +RUN git clone https://github.com/grpc/grpc-web /github/grpc-web + +COPY ./javascript /github/grpc-web/javascript + +RUN cd /github/grpc-web && \ + ./scripts/init_submodules.sh + +RUN cd /github/grpc-web/third_party/grpc/third_party/protobuf && \ + ./autogen.sh && ./configure && make && make install + +RUN cd /github/grpc-web/javascript/net/grpc/web && \ + make protoc-gen-grpc-web