Skip to content

Commit

Permalink
Fix protoc installation for github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Basilio Vera <[email protected]>
  • Loading branch information
bvis committed Nov 23, 2020
1 parent 415b288 commit 26202fa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ FROM golang:1.13-buster AS build
RUN apt-get update \
&& apt-get install -y protobuf-compiler

COPY ./ /go/src/github.com/softonic/homing-pigeon
WORKDIR /go/src/github.com/softonic/homing-pigeon

RUN cd /go/src/github.com/softonic/homing-pigeon && make build
COPY . .

RUN make build &&\
ln /go/src/github.com/softonic/homing-pigeon/bin/homing-pigeon /

FROM scratch

COPY --from=build /go/src/github.com/softonic/homing-pigeon/bin/homing-pigeon /

ENTRYPOINT ["/homing-pigeon", "-logtostderr"]
ENTRYPOINT ["/homing-pigeon", "-logtostderr"]
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
TAG ?= dev

install-protoc:
sudo apt-get install -y protobuf-compiler
generate-proto:
protoc -I proto/ proto/middleware.proto --go_out=plugins=grpc:proto
dep:
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
homing-pigeon:
volumes:
- ./sockets:/tmp
- ./:/go/src/github.com/softonic/homing-pigeon
build:
context: .
dockerfile: Dockerfile
Expand Down Expand Up @@ -50,4 +51,4 @@ services:
ulimits:
memlock:
soft: -1
hard: -1
hard: -1

0 comments on commit 26202fa

Please sign in to comment.