A Docker CLI wrapper to inspect a running container |
- Put
dockeri.sh
somewhere in your path. You can create abin
directory for these type of files.
$ mkdir -p ~/bin
$ cd ~/bin
$ wget https://raw.github.com/a-sierra/dockeri/master/dockeri.sh && chmod +x dockeri.sh
- Add an
dockeri
alias by adding the following line to your~/.bashrc
file.
alias dockeri="~/bin/dockeri.sh"
- Run
$ source ~/.bashrc
- Ready! To get the list of options available, type:
$ dockeri --help
$ dockeri [OPTIONS] CONTAINER_NAME|CONTAINER_ID
For example:
$ dockeri -m some_postgres
[
{
"Type": "volume",
"Name": "feebe0979d972b61ee96042657f844f40727035b5242265dacf43732b9747a32",
"Source": "/var/lib/docker/volumes/feebe0979d972b61ee96042657f844f40727035b5242265dacf43732b9747a32/_data",
"Destination": "/var/lib/postgresql/data",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
]
Print help options
Get container's image id and name
Get container's name
Get container's mounts
Get container's state
Get container's env variables
Get container's networks' information
Get container's list of networks and gateway addresses
Get container's list of networks and ip addresses
Get container's list of networks and mac addresses
Get container's list of networks and aliases
Get container's list of published ports
Get container's args
Get container's CMD
Get container's entrypoint