nftblock 0.1.2

Atomically apply CIDR lists with nftables netlink batches
Documentation
# syntax=docker/dockerfile:1

FROM rust:1-alpine3.24 AS builder

RUN apk add --no-cache build-base libmnl-dev libnftnl-dev pkgconf

WORKDIR /src

COPY Cargo.toml Cargo.lock ./
COPY src ./src

ENV RUSTFLAGS="-C target-feature=-crt-static"

RUN cargo build --locked --release --bin nftblock

FROM alpine:3.24.1

RUN apk add --no-cache ca-certificates libgcc libmnl libnftnl

COPY --from=builder /src/target/release/nftblock /usr/local/bin/nftblock
COPY config/nftblock.toml /etc/nftblock/nftblock.toml

ENTRYPOINT ["nftblock"]