Sign inSign up

nightlegend/grpc-go

By nightlegend

•Updated almost 8 years ago

A GRPC go build and running environment

Image
1

208

nightlegend/grpc-go repository overview

⁠How to use this image

  • build your sources in image

FROM nightlegend/grpc-go:latest
WORKDIR /go/src/{your_project_path}
COPY ./ /go/src/{your_project_path}
RUN go get && \
    go build

  • run it

docker build -t grpc-sample:demo .
docker run -it -v {YOUR_LOCAL_APTH}:/go/src/grpc-sample grpc-sample:demo /bin/bash

"-v {YOUR_LOCAL_APTH}:/go/src/grpc-sample" is mount your source code to container side

  • generate code(GRPC)

protoc -I/usr/local/include -I. \
  -I$GOPATH/src \
  -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
  --go_out=plugins=grpc:. \
  ./service.proto

⁠If you want a GRPC code sample⁠, please enjoy ~~

Tag summary

Content type

Image

Digest

Size

416 MB

Last updated

almost 8 years ago

docker pull nightlegend/grpc-go