Or follow the doc on running docker rootless:
https://docs.docker.com/engine/security/rootless/
But in any case I think it's always better to do docker in docker for security. Also it help control what version of docker is used by the agent and it can then be a different one than the one on the host.