↗ eBPF/XDP on macOS with Apple container
· 4 мин. оқу

Reproduction of eBPF/XDP Applications on macOS with Colima, Docker blogpost,
with Apple's native container CLI in place of Colima + Docker, plus a custom kernel
that restores the features Apple's stock VM kernel leaves out.
Host: Apple M4, macOS 27.0 (build 26A5406e), container 1.3.0, kernel 6.18.15 aarch64.
Verdict
1:1 parity with the blog, and then some. Build, load, attach and detach all
happen inside Apple container. Everything is aarch64 — [build] rosetta is set
to false in ~/.config/container/config.toml, so Rosetta is not merely unused,
it is unavailable to the builder VM.
With the custom kernel in kernel/ the environment additionally supports the
things the blog never gets to: CO-RE, kprobes/tracepoints/fentry, BPF LSM,
AF_XDP and the JIT.