2023-09-07 23:16:20 +02:00
|
|
|
FROM alpine
|
2021-03-27 18:29:28 +01:00
|
|
|
|
2021-02-08 20:48:55 +01:00
|
|
|
# Create main app folder to run from
|
2021-02-07 14:04:24 +01:00
|
|
|
WORKDIR /app
|
|
|
|
|
2021-03-27 18:29:28 +01:00
|
|
|
# Copy compiled binary to release image
|
2023-06-19 21:06:18 +02:00
|
|
|
# (must build the binary before running docker build)
|
|
|
|
COPY fail2ban_exporter /app/fail2ban_exporter
|
2023-09-07 23:16:20 +02:00
|
|
|
|
|
|
|
# Setup a healthcheck
|
2023-09-09 08:15:23 +02:00
|
|
|
COPY health /app/health
|
2023-09-07 23:16:20 +02:00
|
|
|
RUN apk add curl
|
2023-09-09 08:15:23 +02:00
|
|
|
HEALTHCHECK --interval=10s --timeout=4s --retries=3 CMD /app/health
|
2021-02-07 14:04:24 +01:00
|
|
|
|
2022-02-20 09:46:40 +01:00
|
|
|
ENTRYPOINT ["/app/fail2ban_exporter"]
|