What is `--network container:<name>`?

IntermediateConceptNetworking
Answer

It joins a new container to another container's network namespace so they share the same IP, ports and localhost. This is exactly how Kubernetes pods work (a pause container holds the namespace) and how sidecars and debug containers attach.

All Docker questions Roadmap: Docker & containers

More on Networking