FROM rust:latest as builder

COPY . .
RUN cargo build --release

FROM ubuntu:latest

RUN apt update \
  && apt upgrade -y \
  && apt install iptables iptables-persistent systemd -y

COPY --from=builder /target/release/martillo-maldito ./

CMD [ "/martillo-maldito", "ban-service" ]
