From 21abb8eb624734ce849ad553fed390c402aa1bcf Mon Sep 17 00:00:00 2001 From: Juanjo Diaz Date: Mon, 25 Nov 2019 20:13:42 +0200 Subject: [PATCH] Update upstream grpc-web project to 1.0.0 --- Dockerfile | 24 +++++++++++++----------- README.md | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 357ad51..93dbce3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 AS builder ARG MAKEFLAGS=-j8 @@ -11,23 +11,25 @@ RUN apt-get update && apt-get install -y \ RUN git clone https://github.com/grpc/grpc-web /github/grpc-web +WORKDIR /github/grpc-web + +RUN git checkout tags/1.0.0 + ## Install gRPC and protobuf -RUN cd /github/grpc-web && \ - ./scripts/init_submodules.sh +RUN ./scripts/init_submodules.sh -RUN cd /github/grpc-web/third_party/grpc && \ - make && make install +RUN cd third_party/grpc && make && make install -RUN cd /github/grpc-web/third_party/grpc/third_party/protobuf && \ - make install +RUN cd third_party/grpc/third_party/protobuf && make install ## Install all the gRPC-web plugin -RUN cd /github/grpc-web && \ - make install-plugin +RUN make install-plugin + +FROM ubuntu:18.04 -RUN rm -rf /github +COPY --from=builder /usr/local/bin /usr/local/bin ## Create the gRPC client ENV import_style=commonjs @@ -43,4 +45,4 @@ CMD rm -rf $output && \ -I=/protofile \ /protofile/$protofile \ --js_out=import_style=$import_style:$output \ - --grpc-web_out=import_style=$grpc_web_import_style,mode=$mode:$output + --grpc-web_out=import_style=$grpc_web_import_style,mode=$mode:$output \ No newline at end of file diff --git a/README.md b/README.md index ac2e659..b6f8051 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ You can add a script to your NPM file like: ... "scripts": { - "grpc.generate": "docker run -v \":/protofile\" -e \"protofile=.proto\" juanjodiaz/grpc-web-generator" + "grpc.generate": "docker run -v \":/protofile\" -e \"protofile=.proto\" juanjodiaz/grpc-web-generator:1.0.0" }, ...