Crates.io | dockinfo |
lib.rs | dockinfo |
version | 1.0.1 |
source | src |
created_at | 2020-05-01 06:26:13.908796 |
updated_at | 2020-05-01 06:32:17.442853 |
description | A tool to get information from docker containers |
homepage | https://github.com/sntdevco/dockinfo |
repository | https://github.com/sntdevco/dockinfo |
max_upload_size | |
id | 236039 |
size | 18,179 |
dockinfo
?dockinfo
is an utility that enables users to use docker inspect
commands in a more ergonomic way. For now, the inspection options are only limited to checking the ip
address of a given container. More commands will be added soon.
Simply run:
cargo install dockinfo
Note: Windows is not supported, just yet.
sudo ./dockinfo ip containername
Output:
$ sudo ./dockinfo ip containername
'172.17.0.8'
dockinfo
makes use of a DOCKER_BIN
environment variable. Usually you won't need this environment variable unless your docker binary is not in your system PATH
. In that case, you can run the command like this:
$ DOCKER_BIN=/home/username/bin/docker ./dockinfo ip containername
The main reason why I decided to build this is because I use containers that have instances of databases. Now since I use about three databases and the IP addresses assigned to them change quite frequently and it becomes really annoying to keep using the docker inspect
syntax. So I created a simple tool that can be used to inspect docker containers without blowing your mind off using the docker inspect syntax.
Yes, of course! If you can work on any of the docker inspect tasks, go ahead open a PR, and I will be right there!
This project is licensed under the Apache-2.0 License.