f4d6598308
- Include two Dockerfiles in the repo: one for Goreleaser and one for manual builds - Update the Goreleaser config to use it's own Dockerfile - The Dockerfile for manual builds uses a two step process to build the exporter - this way the base system does not need Go installed https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/114
15 lines
375 B
Docker
15 lines
375 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
|
|
|
|
# Setup a healthcheck
|
|
COPY health /app/health
|
|
RUN apk add curl
|
|
HEALTHCHECK --interval=10s --timeout=4s --retries=3 CMD /app/health
|
|
|
|
ENTRYPOINT ["/app/fail2ban_exporter"]
|