mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
Get docker ip
function to get a docker container ip
This commit is contained in:
parent
3ea3384186
commit
7c2e06c063
1 changed files with 7 additions and 0 deletions
7
plugins/docker-ip/docker-ip.plugin.zsh
Normal file
7
plugins/docker-ip/docker-ip.plugin.zsh
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#
|
||||||
|
# To get an IP of a container, simply do this:
|
||||||
|
# docker-ip YOUR_CONTAINER_ID
|
||||||
|
|
||||||
|
docker-ip() {
|
||||||
|
docker inspect --format '{{ .NetworkSettings.IPAddress }}' "$@"
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue