Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugins/connectrpc/python/v0.8.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
16 changes: 16 additions & 0 deletions plugins/connectrpc/python/v0.8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1.19
FROM python:3.11.14-bookworm AS build
WORKDIR /app
RUN python -mvenv /app
RUN . ./bin/activate \
&& pip install --no-cache-dir protoc-gen-connect-python==0.8.0 \
&& pip uninstall --yes pip setuptools \
&& rm -f bin/activate.fish bin/activate.csh bin/Activate.ps1

FROM gcr.io/distroless/python3-debian12:latest@sha256:2971dbfa56eb4f2e33e94709579783406c1e7165b2d92edaa5657da5e8040617 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build --chmod=0755 /app /app
USER nobody
ENTRYPOINT [ "/app/bin/protoc-gen-connect-python" ]
19 changes: 19 additions & 0 deletions plugins/connectrpc/python/v0.8.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: v1
name: buf.build/connectrpc/python
plugin_version: v0.8.0
source_url: https://github.com/connectrpc/connect-python
description: Generates client and server stubs for Connect Python. Compatible with the Connect RPC protocol.
spdx_license_id: Apache-2.0
license_url: https://github.com/connectrpc/connect-python/blob/v0.8.0/LICENSE
deps:
- plugin: buf.build/protocolbuffers/python:v33.3
output_languages:
- python
registry:
python:
package_type: "runtime"
# https://github.com/connectrpc/connect-python/blob/v0.8.0/protoc-gen-connect-python/pyproject.toml#L11
requires_python: ">=3.10"
deps:
# https://pypi.org/project/connect-python/
- "connect-python >= 0.8.0"
3 changes: 3 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.27.5/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!separate_pkg_additional_imports.patch
21 changes: 21 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.27.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1.19
FROM --platform=$BUILDPLATFORM golang:1.25.6-bookworm AS build

ARG TARGETOS TARGETARCH
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH

WORKDIR /tmp
RUN git clone --depth 1 --branch v2.27.5 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 \
go install -ldflags="-s -w" -trimpath \
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-gateway /go/bin/protoc-gen-grpc-gateway || 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-gateway /
USER nobody
ENTRYPOINT [ "/protoc-gen-grpc-gateway" ]
23 changes: 23 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.27.5/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: v1
name: buf.build/grpc-ecosystem/gateway
plugin_version: v2.27.5
source_url: https://github.com/grpc-ecosystem/grpc-gateway
integration_guide_url: https://github.com/grpc-ecosystem/grpc-gateway#usage
description: gRPC to JSON proxy generator following the gRPC HTTP spec.
output_languages:
- go
registry:
go:
min_version: "1.24"
deps:
- module: github.com/grpc-ecosystem/grpc-gateway/v2
version: v2.27.5
opts:
- paths=source_relative
- standalone=true
- separate_package=true
deps:
- plugin: buf.build/protocolbuffers/go:v1.36.11
- plugin: buf.build/grpc/go:v1.6.0
spdx_license_id: BSD-3-Clause
license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.27.5/LICENSE
Loading