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:
+6
-2
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user