Build on git.eeqj.de/sneak/baseimage:2026-11-05 with the docker CLI copied from docker:cli. A runit service sleeps INTERVAL seconds (default 1200), then runs the reporter with --since INTERVAL --submit; DOCKER_CONTAINER_NAME and IPABUSEDB_API_KEY come from the container environment. Add .dockerignore, make image, and README section; fix the binary name in .gitignore.
27 lines
383 B
Makefile
27 lines
383 B
Makefile
BIN := ipabusedb-docker-reporter
|
|
|
|
.PHONY: build test lint fmt fmt-check check clean image
|
|
|
|
build:
|
|
go build -o $(BIN) .
|
|
|
|
image:
|
|
docker build -t $(BIN) .
|
|
|
|
test:
|
|
go test ./...
|
|
|
|
fmt:
|
|
gofmt -w *.go
|
|
|
|
fmt-check:
|
|
@test -z "$$(gofmt -l .)" || { gofmt -l .; echo "gofmt: files need formatting"; exit 1; }
|
|
|
|
lint: fmt-check
|
|
go vet ./...
|
|
|
|
check: lint test build
|
|
|
|
clean:
|
|
rm -f $(BIN) *.csv
|