feat: Docker Compose E2E test env, agent fixes, TAP MAC config, testclient binary

- Add docker-compose.yml with server + init + 3 clients + tester
- Add Dockerfile.server (CGO multi-stage) and Dockerfile.client
- Add .dockerignore for efficient builds
- Add cmd/testclient/main.go: full E2E test binary using SDK
- Fix agent handshake loop: only respond to new handshakes
- Add tapInterface.SetMAC() to match agent's generated MAC
- Call SetMAC() in agent SetTAPIP to fix ARP resolution
- Add data-plane debug logging for troubleshooting
- Change config database path to /tmp/data/ for container use
- Add SetMAC stub for non-Linux builds
This commit is contained in:
xieyao
2026-06-17 05:04:19 +08:00
parent e3147ac06f
commit 807c4cf323
9 changed files with 535 additions and 8 deletions

9
Dockerfile.client Normal file
View File

@@ -0,0 +1,9 @@
FROM golang:1.26-alpine AS builder
WORKDIR /src
COPY . .
RUN go build -o /zmclient ./cmd/testclient/
FROM alpine:3.19
RUN apk add --no-cache iproute2 iptables-legacy
COPY --from=builder /zmclient /usr/local/bin/zmclient
CMD ["zmclient"]