Linux/Docker/Networking: Difference between revisions
(Created page with "<pre> docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /' </pre>") |
mNo edit summary |
||
Line 1: | Line 1: | ||
* List docker container with IPs | |||
<pre> | <pre> | ||
docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /' | docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /' | ||
</pre> | </pre> | ||
[[Category:Linux/Docker]] | |||
[[Category:Linux]] |
Revision as of 19:59, 15 November 2023
- List docker container with IPs
docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /'