Inspect a network
Shows the IPs of all containers in the bridge network
docker network inspect bridge | jq '.[0].Containers | to_entries[] | .value | {Name, IPv4Address}'
- tool
- docker46 commands
More docker commands
-
docker network create --driver bridge --subnet 172.30.0.0/24 mynetCreates a bridge network with its own subnet
-
docker save myapp:1.0 | gzip > myapp.tar.gz && docker load < myapp.tar.gzExports an image to an archive and imports it again, for example on another host
-
HEALTHCHECK --interval=10s --timeout=3s --retries=3 CMD curl -sf http://localhost:8080/health || exit 1Native Docker healthcheck with curl; this line goes into the Dockerfile
-
docker scout cves --only-fixed myapp:latestShows only CVEs that already have a fix
-
docker run --rm -it --pid=host --network=host --privileged nicolaka/netshootNetwork debugging toolbox that shares the host PID namespace and network