fix: use Docker socket HTTP API in swarm collector, no CLI dependency

Replace exec.CommandContext calls (docker ps, docker inspect, nc -z) with
direct HTTP calls over the Unix socket using Go's net/http + custom transport.
Also removes netcat-openbsd from Dockerfile since nc is no longer used.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
William Valentin
2026-03-18 10:36:32 -07:00
parent f48953781b
commit d2d044a3d8
2 changed files with 86 additions and 83 deletions
-1
View File
@@ -20,7 +20,6 @@ RUN apt-get update && apt-get install -y \
ca-certificates \
libvirt-clients \
openssh-client \
netcat-openbsd \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app