Skip to content

[Bug]: hermes command not found during docker exec (requires absolute virtual environment path) #18673

@xguntis

Description

@xguntis

Description:
When attempting to run the Hermes CLI inside the running Docker container using docker exec, the command fails because the hermes executable is not in the $PATH. Even forcing a login shell (bash -l) does not resolve the issue.

Steps to Reproduce:

  1. Start the Hermes Agent Docker container.
  2. Run standard exec: docker exec -it hermes hermes
  3. Run login shell exec: docker exec -it hermes bash -l -c "hermes"

Expected Behavior:
The hermes CLI should execute successfully without requiring the user to know the absolute path to the internal virtual environment.

Actual Behavior:
Both approaches fail:

$ docker exec -it hermes hermes
OCI runtime exec failed: exec failed: unable to start container process: exec: "hermes": executable file not found in $PATH

$ docker exec -it hermes bash -l -c "hermes"
bash: line 1: hermes: command not found

Workaround:
Currently, users must call the binary directly from the virtual environment using its absolute path:
docker exec -it hermes /opt/hermes/.venv/bin/hermes

Suggested Fix:
Update the Dockerfile to include the virtual environment in the global path so it is available to non-interactive and non-login shells.
Adding ENV PATH="/opt/hermes/.venv/bin:$PATH" would resolve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/dockerDocker image, Compose, packagingtype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions