-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update protocolbuffers/go, gRPC, mercari, and PGV plugins (#1677)
- Loading branch information
1 parent
6954b80
commit 4624116
Showing
62 changed files
with
505 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# syntax=docker/dockerfile:1.12 | ||
FROM golang:1.23.5-bookworm AS build | ||
RUN CGO_ENABLED=0 go install -ldflags "-s -w" -trimpath github.com/envoyproxy/protoc-gen-validate/cmd/[email protected] | ||
|
||
FROM scratch | ||
COPY --from=build --link /etc/passwd /etc/passwd | ||
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-validate-cpp . | ||
USER nobody | ||
ENTRYPOINT [ "/protoc-gen-validate-cpp" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: v1 | ||
name: buf.build/bufbuild/validate-cpp | ||
plugin_version: v1.2.1 | ||
source_url: https://github.com/bufbuild/protoc-gen-validate | ||
description: Generates C++ code to validate Protobuf messages using protoc-gen-validate constraints. | ||
deps: | ||
- plugin: buf.build/protocolbuffers/cpp:v29.3 | ||
output_languages: | ||
- cpp | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/bufbuild/protoc-gen-validate/blob/v1.2.1/LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# syntax=docker/dockerfile:1.12 | ||
FROM golang:1.23.5-bookworm AS build | ||
RUN CGO_ENABLED=0 go install -ldflags "-s -w" -trimpath github.com/envoyproxy/protoc-gen-validate/cmd/[email protected] | ||
|
||
FROM scratch | ||
COPY --from=build --link /etc/passwd /etc/passwd | ||
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-validate-go . | ||
USER nobody | ||
ENTRYPOINT [ "/protoc-gen-validate-go" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: v1 | ||
name: buf.build/bufbuild/validate-go | ||
plugin_version: v1.2.1 | ||
source_url: https://github.com/bufbuild/protoc-gen-validate | ||
integration_guide_url: https://github.com/bufbuild/protoc-gen-validate/blob/main/docs.md#go | ||
description: Generates Go code to validate Protobuf messages using protoc-gen-validate constraints. | ||
deps: | ||
- plugin: buf.build/protocolbuffers/go:v1.36.4 | ||
output_languages: | ||
- go | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/bufbuild/protoc-gen-validate/blob/v1.2.1/LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# syntax=docker/dockerfile:1.12 | ||
FROM golang:1.23.5-bookworm AS build | ||
RUN CGO_ENABLED=0 go install -ldflags "-s -w" -trimpath github.com/envoyproxy/protoc-gen-validate/cmd/[email protected] | ||
|
||
FROM scratch | ||
COPY --from=build --link /etc/passwd /etc/passwd | ||
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-validate-java . | ||
USER nobody | ||
ENTRYPOINT [ "/protoc-gen-validate-java" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: v1 | ||
name: buf.build/bufbuild/validate-java | ||
plugin_version: v1.2.1 | ||
source_url: https://github.com/bufbuild/protoc-gen-validate | ||
integration_guide_url: https://github.com/bufbuild/protoc-gen-validate/blob/main/docs.md#java | ||
description: Generates Java code to validate Protobuf messages using protoc-gen-validate constraints. | ||
deps: | ||
- plugin: buf.build/protocolbuffers/java:v29.3 | ||
output_languages: | ||
- java | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/bufbuild/protoc-gen-validate/blob/v1.2.1/LICENSE | ||
registry: | ||
maven: | ||
deps: | ||
- build.buf.protoc-gen-validate:pgv-java-stub:1.2.1 |
2 changes: 2 additions & 0 deletions
2
plugins/community/mercari-grpc-federation/v1.8.0/.dockerignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
16 changes: 16 additions & 0 deletions
16
plugins/community/mercari-grpc-federation/v1.8.0/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# syntax=docker/dockerfile:1.12 | ||
FROM --platform=$BUILDPLATFORM golang:1.23.5-bookworm AS build | ||
|
||
ARG TARGETOS TARGETARCH | ||
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH | ||
|
||
RUN --mount=type=cache,target=/go/pkg/mod \ | ||
go install -ldflags="-s -w" -trimpath github.com/mercari/grpc-federation/cmd/[email protected] \ | ||
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-federation /go/bin/protoc-gen-grpc-federation || true | ||
|
||
FROM scratch | ||
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd | ||
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-grpc-federation . | ||
ENV GOROOT / | ||
USER nobody | ||
ENTRYPOINT [ "/protoc-gen-grpc-federation" ] |
10 changes: 10 additions & 0 deletions
10
plugins/community/mercari-grpc-federation/v1.8.0/buf.plugin.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: v1 | ||
name: buf.build/community/mercari-grpc-federation | ||
plugin_version: v1.8.0 | ||
source_url: https://github.com/mercari/grpc-federation | ||
integration_guide_url: https://github.com/mercari/grpc-federation/blob/main/docs/getting_started.md | ||
description: Generates a gRPC server by writing a custom option in Protocol Buffers | ||
output_languages: | ||
- go | ||
spdx_license_id: MIT | ||
license_url: https://github.com/mercari/grpc-federation/blob/v1.8.0/LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# syntax=docker/dockerfile:1.12 | ||
FROM debian:bookworm-20250113 AS build | ||
|
||
ARG TARGETARCH | ||
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip | ||
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${TARGETARCH} \ | ||
&& chmod +x /usr/local/bin/bazelisk \ | ||
&& mkdir /build \ | ||
&& chown nobody:nogroup /build \ | ||
&& usermod --home /build nobody | ||
|
||
USER nobody | ||
WORKDIR /build | ||
|
||
RUN git clone --depth 1 --branch v1.70.0 https://github.com/grpc/grpc | ||
WORKDIR /build/grpc | ||
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support | ||
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_cpp_plugin.stripped | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:b7550f0b15838de14c564337eef2b804ba593ae55d81ca855421bd52f19bb480 AS base | ||
|
||
FROM scratch | ||
COPY --link --from=base / / | ||
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_cpp_plugin . | ||
USER nobody | ||
ENTRYPOINT ["/grpc_cpp_plugin"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: v1 | ||
name: buf.build/grpc/cpp | ||
plugin_version: v1.70.0 | ||
source_url: https://github.com/grpc/grpc | ||
description: Generates C++ client and server stubs for the gRPC framework. | ||
deps: | ||
- plugin: buf.build/protocolbuffers/cpp:v29.3 | ||
output_languages: | ||
- cpp | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/grpc/grpc/blob/v1.70.0/LICENSE | ||
registry: | ||
cmake: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!Dockerfile | ||
!build.csproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# syntax=docker/dockerfile:1.12 | ||
FROM debian:bookworm-20250113 AS build | ||
|
||
ARG TARGETARCH | ||
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip | ||
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${TARGETARCH} \ | ||
&& chmod +x /usr/local/bin/bazelisk \ | ||
&& mkdir /build \ | ||
&& chown nobody:nogroup /build \ | ||
&& usermod --home /build nobody | ||
|
||
USER nobody | ||
WORKDIR /build | ||
|
||
RUN git clone --depth 1 --branch v1.70.0 https://github.com/grpc/grpc | ||
WORKDIR /build/grpc | ||
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support | ||
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_csharp_plugin.stripped | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0.405-bookworm-slim@sha256:b27b1354af00b7d4c922d74084f5c8a5cbf51f96de9ab855812bf17cbf176dd2 AS dotnetrestore | ||
WORKDIR /build | ||
COPY --link ./build.csproj /build/build.csproj | ||
RUN mkdir /nuget && dotnet restore --packages /nuget | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:b7550f0b15838de14c564337eef2b804ba593ae55d81ca855421bd52f19bb480 AS base | ||
|
||
FROM scratch | ||
COPY --link --from=base / / | ||
COPY --link --from=dotnetrestore /nuget /nuget | ||
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_csharp_plugin . | ||
USER nobody | ||
ENTRYPOINT ["/grpc_csharp_plugin"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: v1 | ||
name: buf.build/grpc/csharp | ||
plugin_version: v1.70.0 | ||
source_url: https://github.com/grpc/grpc | ||
description: Generates C# client and server stubs for the gRPC framework. | ||
deps: | ||
- plugin: buf.build/protocolbuffers/csharp:v29.3 | ||
output_languages: | ||
- csharp | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/grpc/grpc/blob/v1.70.0/LICENSE | ||
registry: | ||
opts: | ||
- base_namespace= | ||
nuget: | ||
target_frameworks: | ||
- netstandard2.0 | ||
deps: | ||
- name: Grpc.Net.Common | ||
version: 2.67.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Grpc.Net.Common" Version="2.67.0" /> | ||
<PackageReference Include="Google.Protobuf" Version="3.29.3" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# syntax=docker/dockerfile:1.12 | ||
FROM debian:bookworm-20250113 AS build | ||
|
||
ARG TARGETARCH | ||
|
||
WORKDIR /build | ||
RUN apt-get update \ | ||
&& apt-get install -y curl | ||
RUN arch=${TARGETARCH}; \ | ||
if [ "${arch}" = "arm64" ]; then\ | ||
arch="aarch_64"; \ | ||
elif [ "${arch}" = "amd64" ]; then\ | ||
arch="x86_64"; \ | ||
fi; \ | ||
echo "${arch}"; \ | ||
curl -fsSL -o protoc-gen-grpc-java https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.70.0/protoc-gen-grpc-java-1.70.0-linux-${arch}.exe | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:b7550f0b15838de14c564337eef2b804ba593ae55d81ca855421bd52f19bb480 AS base | ||
|
||
FROM scratch | ||
COPY --link --from=base / / | ||
COPY --link --from=build --chmod=0755 --chown=root:root /build/protoc-gen-grpc-java . | ||
USER nobody | ||
ENTRYPOINT [ "/protoc-gen-grpc-java" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: v1 | ||
name: buf.build/grpc/java | ||
plugin_version: v1.70.0 | ||
source_url: https://github.com/grpc/grpc-java | ||
integration_guide_url: https://grpc.io/docs/languages/java/quickstart | ||
description: Generates Java client and server stubs for the gRPC framework. | ||
deps: | ||
- plugin: buf.build/protocolbuffers/java:v29.3 | ||
output_languages: | ||
- java | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/grpc/grpc-java/blob/v1.70.0/LICENSE | ||
registry: | ||
maven: | ||
deps: | ||
- io.grpc:grpc-core:1.70.0 | ||
- io.grpc:grpc-protobuf:1.70.0 | ||
- io.grpc:grpc-stub:1.70.0 | ||
# Add direct dependency on newer protobuf as gRPC is still on 3.25.5 | ||
- com.google.protobuf:protobuf-java:4.29.3 | ||
additional_runtimes: | ||
- name: lite | ||
deps: | ||
- io.grpc:grpc-core:1.70.0 | ||
- io.grpc:grpc-protobuf-lite:1.70.0 | ||
- io.grpc:grpc-stub:1.70.0 | ||
# Add direct dependency on newer protobuf as gRPC is still on 3.25.5 | ||
- com.google.protobuf:protobuf-javalite:4.29.3 | ||
- build.buf:protobuf-javalite:4.29.3 | ||
opts: [lite] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# syntax=docker/dockerfile:1.12 | ||
FROM debian:bookworm-20250113 AS build | ||
|
||
ARG TARGETARCH | ||
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip | ||
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${TARGETARCH} \ | ||
&& chmod +x /usr/local/bin/bazelisk \ | ||
&& mkdir /build \ | ||
&& chown nobody:nogroup /build \ | ||
&& usermod --home /build nobody | ||
|
||
USER nobody | ||
WORKDIR /build | ||
|
||
RUN git clone --depth 1 --branch v1.70.0 https://github.com/grpc/grpc | ||
WORKDIR /build/grpc | ||
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support | ||
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_objective_c_plugin.stripped | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:b7550f0b15838de14c564337eef2b804ba593ae55d81ca855421bd52f19bb480 AS base | ||
|
||
FROM scratch | ||
COPY --link --from=base / / | ||
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_objective_c_plugin . | ||
USER nobody | ||
ENTRYPOINT ["/grpc_objective_c_plugin"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: v1 | ||
name: buf.build/grpc/objc | ||
plugin_version: v1.70.0 | ||
source_url: https://github.com/grpc/grpc | ||
description: Generates Objective-C client and server stubs for the gRPC framework. | ||
deps: | ||
- plugin: buf.build/protocolbuffers/objc:v29.3 | ||
output_languages: | ||
- objective_c | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/grpc/grpc/blob/v1.70.0/LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# syntax=docker/dockerfile:1.12 | ||
FROM debian:bookworm-20250113 AS build | ||
|
||
ARG TARGETARCH | ||
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip | ||
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${TARGETARCH} \ | ||
&& chmod +x /usr/local/bin/bazelisk \ | ||
&& mkdir /build \ | ||
&& chown nobody:nogroup /build \ | ||
&& usermod --home /build nobody | ||
|
||
USER nobody | ||
WORKDIR /build | ||
|
||
RUN git clone --depth 1 --branch v1.70.0 https://github.com/grpc/grpc | ||
WORKDIR /build/grpc | ||
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support | ||
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_php_plugin.stripped | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:b7550f0b15838de14c564337eef2b804ba593ae55d81ca855421bd52f19bb480 AS base | ||
|
||
FROM scratch | ||
COPY --link --from=base / / | ||
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_php_plugin . | ||
USER nobody | ||
ENTRYPOINT ["/grpc_php_plugin"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: v1 | ||
name: buf.build/grpc/php | ||
plugin_version: v1.70.0 | ||
source_url: https://github.com/grpc/grpc | ||
description: Generates PHP client and server stubs for the gRPC framework. | ||
deps: | ||
- plugin: buf.build/protocolbuffers/php:v29.3 | ||
output_languages: | ||
- php | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/grpc/grpc/blob/v1.70.0/LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
Oops, something went wrong.