toe-beans 0.12.0

DHCP library, client, and server
Documentation
# See:
# - https://kb.isc.org/docs/perfdhcp
# - https://kea.readthedocs.io/en/stable/man/perfdhcp.8.html

name: perfdhcp

services:
  server:
    extends:
      file: ../server/docker-compose.yml
      service: server
    environment:
      - RUST_LOG=warn
  perfdhcp:
    cap_add:
      - NET_ADMIN
    build:
      dockerfile_inline: |
        FROM debian:trixie-slim AS installer 
        RUN apt update && apt install -y curl bash
        RUN curl -1sLf \
          'https://dl.cloudsmith.io/public/isc/kea-3-0/setup.deb.sh' | bash
        RUN apt update && apt install -y isc-kea-perfdhcp

        # # This appears to be slower because of musl?
        # FROM alpine:latest
        # RUN apk add --no-cache bash curl
        # RUN curl -1sLf \
        #   'https://dl.cloudsmith.io/public/isc/kea-3-0/setup.alpine.sh' \
        #   | bash
        # RUN apk add --no-cache kea-perfdhcp
    depends_on:
      server:
        condition: service_healthy

    # # Uncomment this and set `RUST_LOG=debug` above to test a single client acquiring a single lease.
    # command: perfdhcp -N 67 -L 68 -l eth0 -R 10 -r 10 -p 1 -g multi --scenario basic

    # Uncomment this for load testing
    command: perfdhcp -N 67 -L 68 -l eth0 -W 5 -R 1000000 -p 3 -g multi --scenario basic