Skip to content

Commit

Permalink
feat(prototool): Add grpc-gateway protoc plugin (#66)
Browse files Browse the repository at this point in the history
I also bumped prototool and protoc gen go plugin version to get version
supporting grpc-gateway generation.
  • Loading branch information
lukkor authored and gearnode committed Mar 27, 2019
1 parent 1f38844 commit 9c0e062
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions prototool/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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" \
Expand All @@ -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
Expand Down

0 comments on commit 9c0e062

Please sign in to comment.