Docker Not Found Error

Anyone know why i’m getting this error?

Data
{
    "command": "docker exec ssh useradd -m -p '*' bench-0002-000001-appsvr1",
    "directory": "/home/frappe/agent",
    "duration": "0:00:00.001391",
    "end": "2023-12-20 23:27:47.656056",
    "output": "/bin/sh: 1: docker: not found",
    "returncode": 127,
    "start": "2023-12-20 23:27:47.654665",
    "traceback": "Traceback (most recent call last):\n  File \"/home/frappe/agent/repo/agent/base.py\", line 32, in execute\n    process = subprocess.run(\n  File \"/usr/lib/python3.10/subprocess.py\", line 526, in run\n    raise CalledProcessError(retcode, process.args,\nsubprocess.CalledProcessError: Command 'docker exec ssh useradd -m -p '*' bench-0002-000001-appsvr1' returned non-zero exit status 127.\n"
}
data
Output
/bin/sh: 1: docker: not found
output
Traceback
Traceback (most recent call last):
  File "/home/frappe/agent/repo/agent/base.py", line 32, in execute
    process = subprocess.run(
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'docker exec ssh useradd -m -p '*' bench-0002-000001-appsvr1' returned non-zero exit status 127.

Not much context to go by as far as hosting environment. What does: which docker return?

Docker is not installed?
Or docker is not in the $PATH?

Hey, I think you have not given the permisiion to docker. First uninstall docker and then install docker and after that give the proper access to docker for more you can follow this site. https://computingforgeeks.com/install-docker-ce-on-linux-systems/