Skip to content

nekonenene/grpc_image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gRPC image

gRPC with Go (golang) and Docker

Requirement

  • Docker

Usage

  1. Build images.
    make build
    Or, define the version of protoc.
    make build PROTOC_VER=x.x.x
  2. Run the container to start the gRPC server.
    make run

Development

  1. Put symlink, but it's not necessary if you develop in the docker container.
    make init
  2. When update hello.proto, you should also update hello.pb.go.
    make pb_hello
  3. When update main.go, rebuild the image and rerun the container.
    make build_hello
    make run

Use TLS (SSL)

go run main.go -tls -cert_file ./creds/server.crt -key_file ./creds/server.key