Modern Kubernetes clusters offer powerful primitives like FQDN‑based network policies (e.g., via Cilium, Calico, or Gatekeeper). These let you express rules such as “this workload may only talk to github.com and example.com” without worrying about IP churn, TLS hostname validation, or container‑level DNS quirks.
Docker, however, does not provide anything comparable out of the box.
This article documents a practical approach to implementing domain‑based egress control in plain Docker Compose, without modifying application containers, without terminating TLS, and without introducing heavyweight service meshes. It also covers the pitfalls we encountered—especially around QUIC/HTTP‑3—and compares our approach with the pattern suggested in the [Creating a Simple but Effective Outbound "Firewall" using Vanilla Docker-Compose](sequentialread.com/creating-a-simple-but-effective-firewall-using-vanilla-docker-co