Skip to content

Commit cfc32c8

Browse files
Update mercari-grpc-federation and grpc/node (#1704)
1 parent 076d0c8 commit cfc32c8

File tree

13 files changed

+716
-0
lines changed

13 files changed

+716
-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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# syntax=docker/dockerfile:1.12
2+
FROM --platform=$BUILDPLATFORM golang:1.23.6-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" -trimpath github.com/mercari/grpc-federation/cmd/[email protected] \
9+
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-federation /go/bin/protoc-gen-grpc-federation || true
10+
11+
FROM scratch
12+
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
13+
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-grpc-federation .
14+
ENV GOROOT /
15+
USER nobody
16+
ENTRYPOINT [ "/protoc-gen-grpc-federation" ]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: v1
2+
name: buf.build/community/mercari-grpc-federation
3+
plugin_version: v1.9.1
4+
source_url: https://github.com/mercari/grpc-federation
5+
integration_guide_url: https://github.com/mercari/grpc-federation/blob/main/docs/getting_started.md
6+
description: Generates a gRPC server by writing a custom option in Protocol Buffers
7+
output_languages:
8+
- go
9+
spdx_license_id: MIT
10+
license_url: https://github.com/mercari/grpc-federation/blob/v1.9.1/LICENSE
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!Dockerfile
3+
!package*.json
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# syntax=docker/dockerfile:1.12
2+
FROM node:22.13.1-bookworm AS build
3+
4+
ARG TARGETARCH
5+
6+
WORKDIR /build
7+
COPY --link package* .
8+
RUN npm ci \
9+
&& cp /build/node_modules/grpc-tools/bin/grpc_node_plugin /build
10+
11+
FROM gcr.io/distroless/cc-debian12:latest@sha256:b7550f0b15838de14c564337eef2b804ba593ae55d81ca855421bd52f19bb480 AS base
12+
13+
FROM scratch
14+
COPY --link --from=base / /
15+
COPY --link --from=build --chmod=0755 /build/grpc_node_plugin .
16+
USER nobody
17+
ENTRYPOINT [ "/grpc_node_plugin" ]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: v1
2+
name: buf.build/grpc/node
3+
plugin_version: v1.13.0
4+
source_url: https://github.com/grpc/grpc-node
5+
integration_guide_url: https://grpc.io/docs/languages/node/quickstart
6+
description: Generates Node client and server stubs for the gRPC framework.
7+
deps:
8+
- plugin: buf.build/protocolbuffers/js:v3.21.4
9+
output_languages:
10+
- javascript
11+
registry:
12+
npm:
13+
import_style: commonjs
14+
deps:
15+
- package: '@grpc/grpc-js'
16+
version: '^1.12.6'
17+
- package: 'google-protobuf'
18+
version: '^3.21.4'
19+
opts:
20+
- grpc_js
21+
spdx_license_id: Apache-2.0
22+
license_url: 'https://github.com/grpc/grpc-node/blob/grpc-tools%401.13.0/LICENSE'

0 commit comments

Comments
 (0)