Skip to content

Commit cb697a5

Browse files
Update grpc to v1.68.0 (#1593)
1 parent 0b0f0ae commit cb697a5

File tree

31 files changed

+299
-0
lines changed

31 files changed

+299
-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.10
2+
FROM debian:bookworm-20241111 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.23.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.68.0 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.stripped
22+
23+
FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 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 .
28+
USER nobody
29+
ENTRYPOINT ["/grpc_cpp_plugin"]
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.68.0
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:v28.3
8+
output_languages:
9+
- cpp
10+
spdx_license_id: Apache-2.0
11+
license_url: https://github.com/grpc/grpc/blob/v1.68.0/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.10
2+
FROM debian:bookworm-20241111 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.23.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.68.0 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.stripped
22+
23+
FROM mcr.microsoft.com/dotnet/sdk:8.0.404-bookworm-slim@sha256:f91f9181d68b5ed2c8dea199dbbd2f6d172e60bdc43f8a67878b1ad140cf8d6b 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:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 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 .
34+
USER nobody
35+
ENTRYPOINT ["/grpc_csharp_plugin"]
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.68.0
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:v28.3
8+
output_languages:
9+
- csharp
10+
spdx_license_id: Apache-2.0
11+
license_url: https://github.com/grpc/grpc/blob/v1.68.0/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.66.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.66.0" />
7+
<PackageReference Include="Google.Protobuf" Version="3.28.3" />
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.10
2+
FROM debian:bookworm-20241111 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.23.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.68.0 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.stripped
22+
23+
FROM gcr.io/distroless/cc-debian12:latest@sha256:2fb69596e692931f909c4c69ab09e50608959eaf8898c44fa64db741a23588b0 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 .
28+
USER nobody
29+
ENTRYPOINT ["/grpc_objective_c_plugin"]
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.68.0
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:v28.3
8+
output_languages:
9+
- objective_c
10+
spdx_license_id: Apache-2.0
11+
license_url: https://github.com/grpc/grpc/blob/v1.68.0/LICENSE

0 commit comments

Comments
 (0)