9dc8dd862f
Add a project Dockerfile to allow deploying the application in a docker container. Add a `run.sh` script to start the application in the container. Add Makefile commands to build the docker image based on the Dockerfile. Fix possible nil reference error in the `db` package.
10 lines
258 B
Docker
10 lines
258 B
Docker
# Using golang:latest instead of alpine because of issues with sqlite3
|
|
FROM golang:latest
|
|
|
|
WORKDIR /app
|
|
COPY dist/fail2ban-prometheus-exporter_linux_amd64/fail2ban-prometheus-exporter /app
|
|
COPY docker/run.sh /app
|
|
|
|
RUN chmod +x /app/*
|
|
|
|
ENTRYPOINT /app/run.sh
|