File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed
Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,10 @@ RUN go build -trimpath -ldflags "-s -w" -o /out/protoc-gen-php-grpc-plugin ./pro
1717
1818FROM scratch
1919
20- ARG APP_VERSION=""
21- ARG BUILD_TIME=""
20+ # Supply real metadata at build time, for example:
21+ # docker build --platform linux/amd64 --build-arg BUILD_TIME="$(date -u +%Y-%m-%dT%H:%M:%SZ)" --build-arg APP_VERSION="vX.Y.Z" -f protoc_plugins/Dockerfile .
22+ ARG APP_VERSION="unknown"
23+ ARG BUILD_TIME="unknown"
2224
2325# Runtime dependencies
2426LABEL org.opencontainers.image.title="protoc-gen-php-grpc"
@@ -30,6 +32,8 @@ LABEL org.opencontainers.image.version="${APP_VERSION}"
3032LABEL org.opencontainers.image.created="${BUILD_TIME}"
3133LABEL org.opencontainers.image.licenses="MIT"
3234
33- COPY --from=builder /out/protoc-gen-php-grpc-plugin /protoc-gen-php-grpc-plugin
35+ COPY --from=builder --chown=65532:65532 /out/protoc-gen-php-grpc-plugin /protoc-gen-php-grpc-plugin
36+
37+ USER 65532:65532
3438
3539ENTRYPOINT ["/protoc-gen-php-grpc-plugin" ]
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ func (p *Plugin) createGRPCserver(interceptors map[string]api.Interceptor) (*grp
3434 }
3535
3636 // if we have interceptors in the config, we need to chain them with our interceptor, and add them to the server options
37- if len (p .config .Interceptors ) > 0 && len ( interceptors ) > 0 {
37+ if len (p .config .Interceptors ) > 0 {
3838 // apply interceptors in the same order as they are configured
3939 for i := 0 ; i < len (p .config .Interceptors ); i ++ {
4040 name := p .config .Interceptors [i ]
Original file line number Diff line number Diff line change 11version : ' 3'
2-
32rpc :
43 listen : " tcp://127.0.0.1:6011"
5-
64server :
75 command : " php php_test_files/worker-grpc.php"
86 relay : " pipes"
97 relay_timeout : " 20s"
10-
118logs :
129 mode : development
1310 level : error
14-
1511grpc :
1612 listen : " tcp://127.0.0.1:9011"
17-
1813 proto :
1914 - " proto/service/service.proto"
20-
2115 interceptors :
2216 - " interceptor1"
2317 - " interceptor2"
24-
2518 max_send_msg_size : 50
2619 max_recv_msg_size : 50
2720 max_connection_idle : 0s
3023 max_concurrent_streams : 10
3124 ping_time : 1s
3225 timeout : 200s
33-
3426 pool :
3527 num_workers : 2
3628 max_jobs : 0
You can’t perform that action at this time.
0 commit comments