fail2ban-prometheus-exporter/Dockerfile
Hector 9738a20a82
build: add healthcheck to docker image (!109)
* Update docker image to include a healthcheck instruction using a custom script
* Replace docker base image with alpine

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/109
2023-09-07 21:16:20 +00:00

15 lines
363 B
Docker

FROM alpine
# Create main app folder to run from
WORKDIR /app
# Copy compiled binary to release image
# (must build the binary before running docker build)
COPY fail2ban_exporter /app/fail2ban_exporter
COPY health /app/health
# Setup a healthcheck
RUN apk add curl
HEALTHCHECK --interval=10s --timeout=4s CMD /app/health
ENTRYPOINT ["/app/fail2ban_exporter"]