You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add .IPAddresses as formatting option on docker ps
This allows showing the IP address for each network that the container is attached to,
for example:
docker network create foo
docker run -d --name foo nginx:alpine
docker network connect foo foo
container container ls --format 'table {{.ID}}\\t{{join .IPAddresses ", "}}'
CONTAINER ID IP ADDRESSES
17e7d1910fc0 bridge:172.17.0.2, foo:172.19.0.2
container container ls --format='{{json .IPAddresses}}' | jq .
[
"bridge:172.17.0.2",
"foo:172.19.0.2"
]
Signed-off-by: Sebastiaan van Stijn <[email protected]>
0 commit comments