FROM docker.io/library/golang:1.23-bookworm # Install system dependencies for CNI development. RUN apt-get update && apt-get install -y --no-install-recommends \ wireguard-tools \ iproute2 \ iptables \ python3 \ python3-pip \ python3-venv \ protobuf-compiler \ ca-certificates \ curl \ git \ jq \ && rm -rf /var/lib/apt/lists/* # Install Go tools. RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest \ && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest \ && go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest # Install buf for proto management. RUN curl -sSL "https://github.com/bufbuild/buf/releases/latest/download/buf-$(uname -s)-$(uname -m)" \ -o /usr/local/bin/buf && chmod +x /usr/local/bin/buf WORKDIR /src