If you have a jenkins server running (on serverhost:8080), you can connect the agent via the following command.
docker run -d --restart always -v ~/.composer:/home/jenkins/.composer ghcr.io/core23/jenkins-php-agent:8.2 -url http://serverhost:8080 SECRET AGENT_NAME
Please have a look at the official docs for more information.