d2d044a3d8
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>
39 lines
1.2 KiB
Docker
39 lines
1.2 KiB
Docker
FROM golang:1.25 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /usr/local/bin/ingest-gateway ./cmd/ingest-gateway
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /usr/local/bin/query-api ./cmd/query-api
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /usr/local/bin/web-ui ./cmd/web-ui
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /usr/local/bin/event-processor ./cmd/event-processor
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /usr/local/bin/openclaw-monitor ./cmd/openclaw-monitor
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /usr/local/bin/swarm-monitor ./cmd/swarm-monitor
|
|
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
ca-certificates \
|
|
libvirt-clients \
|
|
openssh-client \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /usr/local/bin/* /usr/local/bin/
|
|
|
|
ENV AGENTMON_ADDR=:8080
|
|
ENV AGENTMON_QUERY_ADDR=:8081
|
|
ENV AGENTMON_UI_ADDR=:8082
|
|
ENV DATABASE_URL=postgres://postgres:pass@postgres:5432/agentmon?sslmode=disable
|
|
ENV NATS_URL=nats://nats:4222
|
|
ENV NATS_TOPIC=agentmon.events.v1
|
|
ENV OPENCLAW_REGISTRY=/openclaw-registry/openclaw-instances.json
|
|
ENV POLL_INTERVAL=30s
|
|
|
|
CMD ["ingest-gateway"]
|