This really barebones "ident" protocol server is intended for use with IRC and works trivially inside a Docker container.
You can obviously modify it to return any ident you want, but it's currently set to "parse" .oidentd.conf (mounted inside the container) as generated by IRC clients such as ZNC.
I've also included an example on how to create an nftables rule to only allow ident queries from IRC servers you first connect to. This means that the ident responder is not usually accessible, but becomes available to IRC servers. Reverse port-knocking of sorts.