Skip to content

Commit

Permalink
Add grpc-gateway and openapiv2 v2.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pkwarren committed Jul 25, 2023
1 parent 52f4536 commit 6f5787c
Show file tree
Hide file tree
Showing 12 changed files with 446 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.16.1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!separate_pkg_additional_imports.patch
18 changes: 18 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.16.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# syntax=docker/dockerfile:1.4
FROM golang:1.20.6-bullseye AS build

WORKDIR /tmp
RUN git clone --depth 1 --branch v2.16.1 https://github.com/grpc-ecosystem/grpc-gateway.git
COPY --link separate_pkg_additional_imports.patch /tmp/separate_pkg_additional_imports.patch
WORKDIR /tmp/grpc-gateway
RUN git apply /tmp/separate_pkg_additional_imports.patch
WORKDIR /tmp/grpc-gateway/protoc-gen-grpc-gateway
RUN --mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 \
go build -ldflags "-s -w" -trimpath

FROM scratch
COPY --from=build --link /etc/passwd /etc/passwd
COPY --from=build --link --chown=root:root /tmp/grpc-gateway/protoc-gen-grpc-gateway .
USER nobody
ENTRYPOINT [ "/protoc-gen-grpc-gateway" ]
21 changes: 21 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.16.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: v1
name: buf.build/grpc-ecosystem/gateway
plugin_version: v2.16.1
source_url: https://github.com/grpc-ecosystem/grpc-gateway
description: gRPC to JSON proxy generator following the gRPC HTTP spec.
output_languages:
- go
registry:
go:
deps:
- module: github.com/grpc-ecosystem/grpc-gateway/v2
version: v2.16.1
opts:
- paths=source_relative
- standalone=true
- separate_package=true
deps:
- plugin: buf.build/protocolbuffers/go:v1.30.0
- plugin: buf.build/grpc/go:v1.3.0
spdx_license_id: BSD-3-Clause
license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.16.1/LICENSE.txt
Loading

0 comments on commit 6f5787c

Please sign in to comment.