Skip to content

Commit

Permalink
Use greater_server (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome authored Jan 19, 2023
1 parent c501106 commit 71c7268
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
13 changes: 5 additions & 8 deletions grpc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# syntax=docker/dockerfile:1.5
FROM golang:1.19 as builder

RUN git clone https:/grpc/grpc-go.git

WORKDIR /go/grpc-go/examples/route_guide/server

RUN sed -i -e 's/localhost//g' server.go
RUN CGO_ENABLED=0 go build -o /grpc_server server.go
RUN GO111MODULE=off go get google.golang.org/grpc/examples/helloworld/greeter_server
WORKDIR /go/src/google.golang.org/grpc/examples/helloworld/greeter_server
RUN CGO_ENABLED=0 go build -o /greeter_server

FROM scratch
COPY --from=builder /grpc_server /
CMD ["/grpc_server"]
COPY --from=builder /greeter_server /
CMD ["/greeter_server"]
4 changes: 2 additions & 2 deletions grpc/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# gRPC Server

From https:/grpc/grpc-go/tree/master/examples/route_guide
From https:/grpc/grpc-go/tree/master/examples/helloworld/greeter_server

The server runs on port 10000.
The server runs on port 50051.

0 comments on commit 71c7268

Please sign in to comment.