# Docker
This docker folder contains first and third party testing for the client and server binaries.
The current tests are:
- Having the client binary get a lease from the server binary.
- Having a third-party client `dhclient` get a lease from the server binary.
- Load testing the server binary with the `perfdhcp` third-party tool.
All of them use docker-compose so that running them is as simple as `cd`ing into the directory and running:
`sudo docker compose up --build`
Since each run will persist lease assignments, you'll want to do this between runs:
`sudo docker compose down`
While running, you can do things like inspect the leases file by entering the container with:
`sudo docker compose exec server bash` and `cat toe-beans.leases`
> [!INFO]
> Hardened, minimal base images are used so what you can do once inside the container is limited. This is a good thing for security, disk space, etc, though.
You can also inspect memory and cpu usage while running with:
`sudo docker compose stats server`
You can view logs of a particular service after a run with:
`sudo docker compose logs perfdhcp`