open-nomad/demo/grpc-checks/Dockerfile
Seth Hoenig f2ef576510 demo: create a demo service for grpc healthchecks
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.
2020-04-24 10:59:50 -06:00

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"]