Files
zeromesh/Dockerfile.server
xieyao 807c4cf323 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
2026-06-17 05:04:19 +08:00

13 lines
378 B
Docker

FROM golang:1.26-alpine AS builder
RUN apk add --no-cache gcc musl-dev
WORKDIR /src
COPY . .
RUN CGO_ENABLED=1 go build -o /zeromesh .
FROM alpine:3.19
RUN apk add --no-cache iproute2 iptables-legacy
COPY --from=builder /zeromesh /usr/local/bin/zeromesh
COPY config.yaml /etc/zeromesh/config.yaml
EXPOSE 10001 19993/udp
CMD ["zeromesh", "-config", "/etc/zeromesh/config.yaml"]