The smallest watchdog on earth. Tiny, monitoring-plugins compatible monitoring with a status page.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines

  1. FROM golang:1-alpine AS build
  2. RUN apk --no-cache add git
  3. RUN go get
  4. COPY . /go/src/
  5. RUN go get
  6. WORKDIR /go/src/
  7. RUN go generate
  8. RUN go build -ldflags '-s -w' -o /tmp/chihuahua
  9. FROM alpine
  10. RUN apk add --no-cache openssh ca-certificates monitoring-plugins
  11. RUN mkdir -p /data/.ssh &&\
  12. echo -e "Host *\n StrictHostKeyChecking accept-new\n UpdateHostKeys yes\n IdentityFile /data/.ssh/id_rsa\n IdentityFile /data/.ssh/id_dsa\n IdentityFile /data/.ssh/id_ecdsa\n IdentityFile /data/.ssh/id_ed25519\n UserKnownHostsFile /data/.ssh/known_hosts" >> /etc/ssh/ssh_config
  13. COPY --from=build /tmp/chihuahua /bin/chihuahua
  14. EXPOSE 80
  15. ENV ADDRESS :80
  16. ENV PATH /usr/lib/monitoring-plugins:/usr/local/bin:/usr/bin:/bin
  17. ENV HOME /data
  18. WORKDIR /data
  19. CMD ["/bin/chihuahua", "-c", "/data/chihuahua.yml"]