feat(shell): add dkip alias to the ip address of a container
This alias will inspect a container and pull out the ip address so you can get to it on the network without having to bind ports.
This commit is contained in:
parent
6976cfe1fa
commit
67630dcbbf
1 changed files with 4 additions and 0 deletions
|
|
@ -30,6 +30,10 @@ function dktop() {
|
||||||
docker stats --format "table {{.Container}}\t{{.Name}}\t{{.CPUPerc}} {{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}"
|
docker stats --format "table {{.Container}}\t{{.Name}}\t{{.CPUPerc}} {{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dkip() {
|
||||||
|
docker inspect $1 | jq -r '.[0].NetworkSettings.Networks | .[].IPAddress'
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Docker Compose
|
# Docker Compose
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue