frappe / agent

Works with https://github.com/frappe/press
GNU Affero General Public License v3.0
62 stars 84 forks source link

Add User to Proxy: No such container: ssh #119

Closed casesolved-co-uk closed 1 month ago

casesolved-co-uk commented 1 month ago

Strange syntax for agent job Add User to Proxy results in error: Error response from daemon: No such container: ssh

Syntax for docker is: Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]

Am I missing a proxy setup step?

{
    "command": "docker exec ssh useradd -m -p '*' bench-0001-000008-s1",
    "directory": "/home/frappe/agent",
    "duration": "0:00:00.069178",
    "end": "2024-08-17 21:22:35.636943",
    "output": "Error response from daemon: No such container: ssh",
    "returncode": 1,
    "start": "2024-08-17 21:22:35.567765",
    "status": "Failure",
    "traceback": "Traceback (most recent call last):\n  File \"/home/frappe/agent/repo/agent/base.py\", line 52, in execute\n    output, returncode = self.run_subprocess(\n  File \"/home/frappe/agent/repo/agent/base.py\", line 105, in run_subprocess\n    raise subprocess.CalledProcessError(\nsubprocess.CalledProcessError: Command 'docker exec ssh useradd -m -p '*' bench-0001-000008-s1' returned non-zero exit status 1.\n"
}
casesolved-co-uk commented 1 month ago

For anyone else finding this, you must first run the following action on your proxy successfully:

Setup SSH Proxy

It depends on having an SSH Certificate Authority setup, an image built and registered with the docker registry