Image nousresearch hermes agent have docker cli pre installed

Yes, the official nousresearch/hermes-agent Docker image does have the Docker CLI pre-installed.

According to the official NousResearch/hermes-agent Dockerfile, it uses a Debian base image and explicitly runs apt-get install -y docker-cli. This was done specifically to support the Docker terminal backend, allowing the agent to spin up secure execution sandboxes directly on the host machine using Docker-out-of-Docker (DooD).

How to use it for your use case:

Since the Docker CLI is already present inside the image, you do not need to create a custom Dockerfile. You only need to do two things:

  1. Mount the Docker socket when starting the agent: When running the nousresearch/hermes-agent container, pass the host's docker socket into the container so the internal CLI can talk to your host's Docker daemon:

docker run -d \ --name hermes \ -v /var/run/docker.sock:/var/run/docker.sock \ -v ~/.hermes:/opt/data \ nousresearch/hermes-agent

  1. Configure the Hermes Docker Backend In Hermes Agent's configuration file (usually located at ~/.hermes/config.yaml on your host, which maps to /opt/data/config.yaml inside the container), set the terminal backend to docker:

terminal: backend: docker

Once configured this way, when you ask Hermes Agent to clone and test drive a git repo, it will automatically use the docker CLI locally to spin up a temporary, isolated sibling container on your host machine to safely execute the code and interact with the repository.

Note: If you run into permission denied errors inside the container when it tries to run Docker commands, you may need to adjust the permissions of /var/run/docker.sock on your host machine or ensure the hermes user inside the container has access to the Docker group.