The smallest watchdog on earth. Tiny, monitoring-plugins compatible monitoring with a status page. https://cloud.docker.com/repository/docker/momar/chihuahua/general
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.
 
 
 
 
 
 

29 lines
1008 B

  1. FROM golang:1-alpine AS build
  2. RUN apk --no-cache add git
  3. COPY ./go.mod /build/go.mod
  4. WORKDIR /build
  5. RUN go mod download
  6. # Using v0.12.8 because of https://github.com/markbates/pkger/issues/56
  7. RUN go get github.com/markbates/pkger@v0.12.8 && go build -o /bin/pkger github.com/markbates/pkger/cmd/pkger
  8. COPY . /build
  9. RUN go generate
  10. RUN go build -ldflags '-s -w' -o chihuahua ./cmd
  11. FROM alpine
  12. RUN apk add --no-cache openssh ca-certificates monitoring-plugins
  13. RUN mkdir -p /data/.ssh &&\
  14. 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
  15. COPY --from=build /build/chihuahua /bin/chihuahua
  16. EXPOSE 80
  17. ENV PORT 80
  18. ENV PATH /usr/lib/monitoring-plugins:/usr/local/bin:/usr/bin:/bin
  19. ENV HOME /data
  20. WORKDIR /data
  21. ENTRYPOINT ["/bin/chihuahua", "-c", "/data/chihuahua.hcl"]