Skip to content

Commit 3d5f153

Browse files
Update grpc/web and sudorandom-connect-openapi plugins (#2002)
1 parent 804fd7d commit 3d5f153

10 files changed

Lines changed: 83 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# syntax=docker/dockerfile:1.17
2+
FROM --platform=$BUILDPLATFORM golang:1.25.0-bookworm AS build
3+
4+
ARG TARGETOS TARGETARCH
5+
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH
6+
7+
RUN --mount=type=cache,target=/go/pkg/mod \
8+
go install -ldflags "-s -w" -tags remote_plugin -trimpath github.com/sudorandom/protoc-gen-connect-openapi@v0.21.1 \
9+
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-connect-openapi /go/bin/protoc-gen-connect-openapi || true
10+
11+
FROM scratch
12+
COPY --from=build --link /etc/passwd /etc/passwd
13+
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-connect-openapi .
14+
USER nobody
15+
ENTRYPOINT [ "/protoc-gen-connect-openapi" ]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: v1
2+
name: buf.build/community/sudorandom-connect-openapi
3+
plugin_version: v0.21.1
4+
source_url: https://github.com/sudorandom/protoc-gen-connect-openapi
5+
description: Plugin for generating OpenAPIv3 from Protobufs matching the Connect RPC interface.
6+
spdx_license_id: MIT
7+
license_url: https://github.com/sudorandom/protoc-gen-connect-openapi/blob/v0.21.1/LICENSE
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile

‎plugins/grpc/web/v2.0.1/Dockerfile‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# syntax=docker/dockerfile:1.17
2+
FROM debian:bookworm-20250811 AS build
3+
4+
ARG TARGETARCH
5+
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true"
6+
7+
RUN apt-get update \
8+
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
9+
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-${TARGETARCH} \
10+
&& chmod +x /usr/local/bin/bazelisk \
11+
&& mkdir /build \
12+
&& chown nobody:nogroup /build \
13+
&& usermod --home /build nobody
14+
15+
USER nobody
16+
WORKDIR /build
17+
RUN curl -fsSL -o grpc-web-src.tar.gz https://github.com/grpc/grpc-web/releases/download/2.0.1/grpc-web-source-2.0.1.tar.gz \
18+
&& tar -zxf grpc-web-src.tar.gz \
19+
&& rm grpc-web-src.tar.gz
20+
WORKDIR /build/grpc-web-2.0.1
21+
RUN bazelisk ${BAZEL_OPTS} build '//javascript/net/grpc/web/generator:protoc-gen-grpc-web'
22+
23+
FROM gcr.io/distroless/cc-debian12:latest@sha256:d4e8c4c18626ce7c09104d3b39d9e5541ced61de7fb398a455cb09ae5a7b3598 AS base
24+
25+
FROM scratch
26+
COPY --from=base --link / /
27+
COPY --from=build --link --chmod=0755 /build/grpc-web-2.0.1/bazel-bin/javascript/net/grpc/web/generator/protoc-gen-grpc-web .
28+
USER nobody
29+
ENTRYPOINT [ "/protoc-gen-grpc-web" ]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: v1
2+
name: buf.build/grpc/web
3+
plugin_version: v2.0.1
4+
source_url: https://github.com/grpc/grpc-web
5+
integration_guide_url: https://grpc.io/docs/platforms/web/quickstart
6+
description: gRPC for Web Clients.
7+
deps:
8+
- plugin: buf.build/protocolbuffers/js:v3.21.4
9+
output_languages:
10+
- javascript
11+
- typescript
12+
registry:
13+
npm:
14+
import_style: commonjs
15+
deps:
16+
- package: 'grpc-web'
17+
version: '^2.0.1'
18+
- package: 'google-protobuf'
19+
version: '^3.21.4'
20+
opts:
21+
- import_style=commonjs+dts
22+
- mode=grpcweb
23+
spdx_license_id: Apache-2.0
24+
license_url: https://github.com/grpc/grpc-web/blob/2.0.1/LICENSE
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:hoDQv39ijB2GCqQTnGlgVj1q8JPDB9lmQkY0WUmE+Qc=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:tXvqQAI2yeM8+7VlRR4LY5WOPVz6elhwUNQjC7wJpeM=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:XZ4Tz9Rqo9MbbxyXO9+c3Fa+M3eOnajGj3ZmxGPHEe4=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:YQw95ELEKhGNtqQlt1sbiySi0U5B4RCsLDAKeKAW0Pc=

0 commit comments

Comments
 (0)