diff --git a/Dockerfile b/Dockerfile index 3863480..7dbd76f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file +ENTRYPOINT ["/homing-pigeon", "-logtostderr"] diff --git a/Makefile b/Makefile index f75020e..d808dd8 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/docker-compose.yaml b/docker-compose.yaml index 2e059c3..be53630 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,6 +4,7 @@ services: homing-pigeon: volumes: - ./sockets:/tmp + - ./:/go/src/github.com/softonic/homing-pigeon build: context: . dockerfile: Dockerfile @@ -50,4 +51,4 @@ services: ulimits: memlock: soft: -1 - hard: -1 \ No newline at end of file + hard: -1