f2ef576510
Examples for HTTP based task-group service healthchecks are covered by the `countdash` demo, but gRPC checks currently have no runnable examples. This PR adds a trivial gRPC enabled application that provides a Service implementing the standard gRPC healthcheck interface.
19 lines
371 B
Docker
19 lines
371 B
Docker
FROM golang:alpine as builder
|
|
WORKDIR /build
|
|
ADD . /build
|
|
RUN apk add protoc && \
|
|
go get -u github.com/golang/protobuf/protoc-gen-go
|
|
RUN go version && \
|
|
go env && \
|
|
go generate && \
|
|
CGO_ENABLED=0 GOOS=linux go build
|
|
|
|
FROM alpine:latest
|
|
MAINTAINER nomadproject.io
|
|
|
|
WORKDIR /opt
|
|
COPY --from=builder /build/grpc-checks /opt
|
|
|
|
ENTRYPOINT ["/opt/grpc-checks"]
|
|
|