From 9c0e06275cf25f4158e6697572bfb645236cd1a7 Mon Sep 17 00:00:00 2001 From: Ludovic Date: Wed, 27 Mar 2019 14:08:25 +0100 Subject: [PATCH] feat(prototool): Add grpc-gateway protoc plugin (#66) I also bumped prototool and protoc gen go plugin version to get version supporting grpc-gateway generation. --- prototool/Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/prototool/Dockerfile b/prototool/Dockerfile index 21e843f..035ffec 100644 --- a/prototool/Dockerfile +++ b/prototool/Dockerfile @@ -1,8 +1,9 @@ FROM golang:1.11.0-alpine3.8 AS build -ENV PROTOTOOL_VERSION=1.3.0 +ENV PROTOTOOL_VERSION=1.4.0 ENV PROTOC_VERSION=3.6.1 -ENV PROTOC_GEN_GO_VERSION=1.2.0 +ENV PROTOC_GEN_GO_VERSION=1.3.1 +ENV PROTOC_GEN_GRPC_GATEWAY_VERSION=1.8.5 RUN apk add --no-cache curl git libc6-compat @@ -20,6 +21,11 @@ RUN go get github.com/golang/protobuf/... && \ git checkout -b v$PROTOC_GEN_GO_VERSION && \ go install ./protoc-gen-go +RUN go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway && \ + cd /go/src/github.com/grpc-ecosystem/grpc-gateway && \ + git checkout -b v$PROTOC_GEN_GRPC_GATEWAY_VERSION && \ + go install ./protoc-gen-grpc-gateway + FROM alpine:3.8 LABEL vendor="Jobteaser" \ @@ -35,11 +41,13 @@ RUN apk add --no-cache libc6-compat git make ruby su-exec && \ COPY --from=build /usr/local/bin/prototool /usr/local/bin/prototool COPY --from=build /go/bin/protoc-gen-go /usr/local/bin/protoc-gen-go +COPY --from=build /go/bin/protoc-gen-grpc-gateway /usr/local/bin/protoc-gen-grpc-gateway ENV PATH /usr/local/go/bin:$PATH RUN chmod +x /usr/local/bin/prototool && \ - chmod +x /usr/local/bin/protoc-gen-go + chmod +x /usr/local/bin/protoc-gen-go && \ + chmod +x /usr/local/bin/protoc-gen-grpc-gateway COPY entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh