diff --git a/Dockerfile b/Dockerfile index 3fbfc5e8..fa35848a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,8 @@ RUN set -ex && apk --update --no-cache add \ libstdc++ \ ca-certificates \ nss \ - linux-headers + linux-headers \ + unzip WORKDIR /tmp COPY all/install-protobuf.sh /tmp @@ -57,8 +58,13 @@ RUN make -C /go/src/github.com/envoyproxy/protoc-gen-validate/ build RUN go get -u github.com/mwitkow/go-proto-validators/protoc-gen-govalidators -# Add grpc-web support +# Add scala support +RUN curl -LO https://github.com/scalapb/ScalaPB/releases/download/v0.9.6/protoc-gen-scala-0.9.6-linux-x86_64.zip \ + && unzip protoc-gen-scala-0.9.6-linux-x86_64.zip \ + && chmod +x /tmp/protoc-gen-scala + +# Add grpc-web support RUN curl -sSL https://github.com/grpc/grpc-web/releases/download/${grpc_web}/protoc-gen-grpc-web-${grpc_web}-linux-x86_64 \ -o /tmp/grpc_web_plugin && \ chmod +x /tmp/grpc_web_plugin @@ -87,6 +93,8 @@ COPY --from=build /usr/local/bin/prototool /usr/local/bin/prototool COPY --from=build /go/bin/* /usr/local/bin/ COPY --from=build /tmp/grpc_web_plugin /usr/local/bin/grpc_web_plugin +COPY --from=build /tmp/protoc-gen-scala /usr/local/bin/ + COPY --from=build /go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/ /opt/include/protoc-gen-swagger/options/ COPY --from=build /go/src/github.com/envoyproxy/protoc-gen-validate/ /opt/include/ diff --git a/all/entrypoint.sh b/all/entrypoint.sh index f846fb5d..142b2993 100755 --- a/all/entrypoint.sh +++ b/all/entrypoint.sh @@ -40,7 +40,7 @@ DOCS_FORMAT="html,index.html" GEN_TYPESCRIPT=false LINT=false LINT_CHECKS="" -SUPPORTED_LANGUAGES=("go" "ruby" "csharp" "java" "python" "objc" "gogo" "php" "node" "web" "cpp" "descriptor_set") +SUPPORTED_LANGUAGES=("go" "ruby" "csharp" "java" "python" "objc" "gogo" "php" "node" "web" "cpp" "descriptor_set" "scala") EXTRA_INCLUDES="" OUT_DIR="" GO_SOURCE_RELATIVE="" @@ -265,6 +265,9 @@ plugins=grpc+embedded\ "java") GEN_STRING="--grpc_out=$OUT_DIR --${GEN_LANG}_out=$OUT_DIR --plugin=protoc-gen-grpc=`which protoc-gen-grpc-java`" ;; + "scala") + GEN_STRING="--scala_out=$OUT_DIR --plugin=`which protoc-gen-scala`" + ;; "node") GEN_STRING="--grpc_out=$OUT_DIR --js_out=import_style=commonjs,binary:$OUT_DIR --plugin=protoc-gen-grpc=`which grpc_${PLUGIN_LANG}_plugin`" ;;