-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
7 additions
and
10 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 |
---|---|---|
@@ -1,13 +1,10 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
FROM golang:1.19 as builder | ||
|
||
RUN git clone https://github.com/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"] |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# gRPC Server | ||
|
||
From https://github.com/grpc/grpc-go/tree/master/examples/route_guide | ||
From https://github.com/grpc/grpc-go/tree/master/examples/helloworld/greeter_server | ||
|
||
The server runs on port 10000. | ||
The server runs on port 50051. |