Skip to content

Commit

Permalink
fix & bump go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs committed Sep 23, 2021
1 parent 9e3a433 commit 3fd7494
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
12 changes: 8 additions & 4 deletions go_grpc_bench/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
FROM golang:1.15
FROM golang:1.17

WORKDIR /app
COPY go_grpc_bench /app
COPY proto /app/proto

RUN apt update && apt install -y protobuf-compiler
RUN go get -u github.com/golang/protobuf/protoc-gen-go
RUN protoc -I /app/proto/helloworld /app/proto/helloworld/helloworld.proto --go_out=plugins=grpc:/app/proto/helloworld
RUN go build ./... && go install ./...
RUN go get google.golang.org/protobuf/cmd/protoc-gen-go
RUN go get google.golang.org/grpc/cmd/protoc-gen-go-grpc


RUN mkdir -p /app/vendor
RUN protoc -I /app/proto/helloworld /app/proto/helloworld/helloworld.proto --go-grpc_out=/app/ --go_out=/app/
RUN go mod tidy && go mod vendor && go build ./... && go install ./...

ENTRYPOINT example
2 changes: 1 addition & 1 deletion go_grpc_bench/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"net"

"google.golang.org/grpc"
pb "google.golang.org/grpc/examples/helloworld/helloworld"
pb "local/proto/helloworld"
)

const (
Expand Down
13 changes: 7 additions & 6 deletions go_grpc_bench/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
module example

go 1.15
go 1.17

require (
github.com/golang/mock v1.1.1
github.com/golang/protobuf v1.4.2
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
google.golang.org/genproto v0.0.0-20200624020401-64a14ca9d1ad
google.golang.org/grpc v1.29.1
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98
google.golang.org/grpc v1.36.0
google.golang.org/protobuf v1.27.1
)

replace local => ./

0 comments on commit 3fd7494

Please sign in to comment.