fix: agent Dockerfile package structure and Dead container crash

- Dockerfile: COPY to /app/agent/ and use agent.main:app for proper
  package imports
- docker_ops: use low-level API in get_health() to avoid NotFound on
  containers stuck in Docker Dead state
- Add comprehensive README with architecture, API docs, and usage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 22:48:20 -06:00
parent d92d67ebdc
commit fe76ca7456
3 changed files with 94 additions and 6 deletions
+6 -2
View File
@@ -217,8 +217,12 @@ class DockerOps:
return {"success": False, "message": str(exc)}
def get_health(self) -> dict:
"""Return node health info: hostname and container count."""
containers = self.client.containers.list(all=True)
"""Return node health info: hostname and container count.
Uses the low-level API to avoid NotFound errors from containers
stuck in Docker's 'Dead' state.
"""
containers = self.client.api.containers(all=True)
return {
"status": "healthy",
"hostname": socket.gethostname(),