grpc - replaced fortune-builder app with official greeter app (#7360)

This commit is contained in:
Long 2021-07-23 02:21:18 +05:30 committed by GitHub
parent 9e274dd41c
commit 91a4bba026
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 220 additions and 617 deletions

View file

@ -0,0 +1,16 @@
FROM golang:buster as build
WORKDIR /go/src/greeter-server
RUN curl -o main.go https://github.com/grpc/grpc-go/blob/91e0aeb192456225adf27966d04ada4cf8599915/examples/features/reflection/server/main.go && \
go mod init greeter-server && \
go mod tidy && \
go build -o /greeter-server main.go
FROM gcr.io/distroless/base-debian10
COPY --from=build /greeter-server /
EXPOSE 50051
CMD ["/greeter-server"]