Skip to content

Commit 5436c19

Browse files
Add grpc 1.74.1 and protocolbuffers/go 1.36.7 plugins (#1947)
1 parent 3959079 commit 5436c19

File tree

36 files changed

+338
-0
lines changed

36 files changed

+338
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!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-20250721 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.26.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+
18+
RUN git clone --depth 1 --branch v1.74.1 https://github.com/grpc/grpc
19+
WORKDIR /build/grpc
20+
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support
21+
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_cpp_plugin
22+
23+
FROM gcr.io/distroless/cc-debian12:latest@sha256:bf0494952368db47e9e38eecc325c33f5ee299b1b1ccc5d9e30bdf1e5e4e3a58 AS base
24+
25+
FROM scratch
26+
COPY --link --from=base / /
27+
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_cpp_plugin_binary .
28+
USER nobody
29+
ENTRYPOINT ["/grpc_cpp_plugin_binary"]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: v1
2+
name: buf.build/grpc/cpp
3+
plugin_version: v1.74.1
4+
source_url: https://github.com/grpc/grpc
5+
description: Generates C++ client and server stubs for the gRPC framework.
6+
deps:
7+
- plugin: buf.build/protocolbuffers/cpp:v31.1
8+
output_languages:
9+
- cpp
10+
spdx_license_id: Apache-2.0
11+
license_url: https://github.com/grpc/grpc/blob/v1.74.1/LICENSE
12+
registry:
13+
cmake: {}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!Dockerfile
3+
!build.csproj
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# syntax=docker/dockerfile:1.17
2+
FROM debian:bookworm-20250721 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.26.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+
18+
RUN git clone --depth 1 --branch v1.74.1 https://github.com/grpc/grpc
19+
WORKDIR /build/grpc
20+
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support
21+
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_csharp_plugin
22+
23+
FROM mcr.microsoft.com/dotnet/sdk:8.0.413-bookworm-slim@sha256:45e41fe52eb60f42bd75c83b7e8bfff0523e031e042b4c1fc7ddb9c348898c64 AS dotnetrestore
24+
WORKDIR /build
25+
COPY --link ./build.csproj /build/build.csproj
26+
RUN mkdir /nuget && dotnet restore --packages /nuget
27+
28+
FROM gcr.io/distroless/cc-debian12:latest@sha256:bf0494952368db47e9e38eecc325c33f5ee299b1b1ccc5d9e30bdf1e5e4e3a58 AS base
29+
30+
FROM scratch
31+
COPY --link --from=base / /
32+
COPY --link --from=dotnetrestore /nuget /nuget
33+
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_csharp_plugin_binary .
34+
USER nobody
35+
ENTRYPOINT ["/grpc_csharp_plugin_binary"]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: v1
2+
name: buf.build/grpc/csharp
3+
plugin_version: v1.74.1
4+
source_url: https://github.com/grpc/grpc
5+
description: Generates C# client and server stubs for the gRPC framework.
6+
deps:
7+
- plugin: buf.build/protocolbuffers/csharp:v31.1
8+
output_languages:
9+
- csharp
10+
spdx_license_id: Apache-2.0
11+
license_url: https://github.com/grpc/grpc/blob/v1.74.1/LICENSE
12+
registry:
13+
opts:
14+
- base_namespace=
15+
nuget:
16+
target_frameworks:
17+
- netstandard2.0
18+
deps:
19+
- name: Grpc.Net.Common
20+
version: 2.71.0
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>netstandard2.0</TargetFramework>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageReference Include="Grpc.Net.Common" Version="2.71.0" />
7+
<PackageReference Include="Google.Protobuf" Version="3.31.1" />
8+
</ItemGroup>
9+
</Project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!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-20250721 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.26.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+
18+
RUN git clone --depth 1 --branch v1.74.1 https://github.com/grpc/grpc
19+
WORKDIR /build/grpc
20+
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support
21+
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_objective_c_plugin
22+
23+
FROM gcr.io/distroless/cc-debian12:latest@sha256:bf0494952368db47e9e38eecc325c33f5ee299b1b1ccc5d9e30bdf1e5e4e3a58 AS base
24+
25+
FROM scratch
26+
COPY --link --from=base / /
27+
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_objective_c_plugin_binary .
28+
USER nobody
29+
ENTRYPOINT ["/grpc_objective_c_plugin_binary"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: v1
2+
name: buf.build/grpc/objc
3+
plugin_version: v1.74.1
4+
source_url: https://github.com/grpc/grpc
5+
description: Generates Objective-C client and server stubs for the gRPC framework.
6+
deps:
7+
- plugin: buf.build/protocolbuffers/objc:v31.1
8+
output_languages:
9+
- objective_c
10+
spdx_license_id: Apache-2.0
11+
license_url: https://github.com/grpc/grpc/blob/v1.74.1/LICENSE

0 commit comments

Comments
 (0)