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.
More on Networking
What network drivers does Docker have?BeginnerHow does the default bridge network work?AdvancedDefault bridge vs user-defined bridge: what is the difference?IntermediateHow does container DNS work?IntermediateHow does `-p 8080:80` work under the hood?AdvancedWhat is the difference between `-p 80:80` and `-p 127.0.0.1:80:80`?Beginner