Docker CLI
docker network inspect
Returns network details. Narrow formatted output to the fields you need; membership is not proof of connectivity. The example requires the lab network from the custom networks lesson. Record the network ID and verify membership before removing a lab network.
Formal Syntax & Structure
docker syntaxdocker
docker network inspect [OPTIONS] NETWORK [NETWORK...]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| NETWORK | string | Network name or ID. |
| --format | string | Go template selecting fields. |
Working Example
Example Snippetdocker
docker network inspect --format '{{.Driver}} {{.Internal}}' bm-v05-custom-net