Package: idocker
idocker简体中文|EnglishIntroduceThis tool is a supplement to docker's official command line tool and can output container information in a human-friendly way to increase readability⭐️ 🌟 ✨ ⚡️ ☄️ 💥InstallationPackage is uploaded on PyPI:idockerYou can install it with pip:pipinstallidockerRequirementsPython : 3.8 and newerMake sure you have docker installed on your machineDocumentation📄 Intensified preparation in progressExampleView container running informationEnter the command in the terminal:idocker psThe following output is obtainedThereisatotalof17container|id|status|name|memory|cpu(%)||:-------------|:-----------|:---------------------|:----------|----------:||f96ba3157d97|⭕️exited|mystifying_kapitsa|0.0MB|0||1647f82f4f5d|⭕️exited|hardcore_benz|0.0MB|0||d34a102050d3|⭕️exited|minikube|0.0MB|0||62e74fb7138e|⭕️exited|nginx|0.0MB|0||21b45572fd50|⭕️exited|thirsty_stonebraker|0.0MB|0||3a7729ee272b|⭕️exited|sad_lalande|0.0MB|0||16e49729de2d|⭕️exited|twitter_redis|0.0MB|0||98df9168bbd5|⭕️exited|rustdesk-hbbr|0.0MB|0||bf19958f710f|⭕️exited|rustdesk-hbbs|0.0MB|0||874838b6335d|⭕️exited|twitter_mysql8|0.0MB|0||57469356f55b|⭕️exited|heuristic_northcutt|0.0MB|0||6fd8b4c901f1|⭕️exited|competent_ritchie|0.0MB|0||cb0ef103c8f6|✅running|twitter_memcahed|5.57MB|0.007||aa291a307aac|✅running|rebloom|8.65MB|0.098||1e08693fdcfd|✅running|public_minio|108.28MB|0.055||7b411cf33283|✅running|rabbitmq3-management|144.1MB|0.556||c50ca07d3d41|✅running|mysql8|282.34MB|0.339|By default, the sorting is in ascending order of memory usageIf you want to change the default sorting, you can see the help information 'idocker ps --help'Usage:python-midocker.cli.mainps[OPTIONS]viewallcontainer

Options:--idSortbyid--statusSortbyid--nameSortbyname--cpuSortbycpustatsusage--memSortbymemorystatsusage[default:True]-i,--image_nameShowImagename--helpShowthismessageandexit.For example, if you want to know which containers are using the most cpu, you can type 'idocker ps --cpu' and it will be sorted in ascending order of cpu usageThereisatotalof17container|id|status|name|memory|cpu(%)||:-------------|:-----------|:---------------------|:----------|----------:||f96ba3157d97|⭕️exited|mystifying_kapitsa|0.0MB|0||d34a102050d3|⭕️exited|minikube|0.0MB|0||62e74fb7138e|⭕️exited|nginx|0.0MB|0||57469356f55b|⭕️exited|heuristic_northcutt|0.0MB|0||16e49729de2d|⭕️exited|twitter_redis|0.0MB|0||21b45572fd50|⭕️exited|thirsty_stonebraker|0.0MB|0||1647f82f4f5d|⭕️exited|hardcore_benz|0.0MB|0||3a7729ee272b|⭕️exited|sad_lalande|0.0MB|0||bf19958f710f|⭕️exited|rustdesk-hbbs|0.0MB|0||6fd8b4c901f1|⭕️exited|competent_ritchie|0.0MB|0||874838b6335d|⭕️exited|twitter_mysql8|0.0MB|0||98df9168bbd5|⭕️exited|rustdesk-hbbr|0.0MB|0||cb0ef103c8f6|✅running|twitter_memcahed|5.57MB|0.007||1e08693fdcfd|✅running|public_minio|107.95MB|0.054||aa291a307aac|✅running|rebloom|8.63MB|0.098||c50ca07d3d41|✅running|mysql8|281.5MB|0.338||7b411cf33283|✅running|rabbitmq3-management|143.62MB|0.553|Note that cpu 100% does not mean that 100% of the whole machine is consumed, but 100% of the single coreSometimes, we seem to know the image name of the container, we can add '-i' or '--image name' parameter to display the image name at the same time╰─➤idockerps-i
Thereisatotalof21container|id|status|name|memory|cpu(%)|image||:-------------|:-----------|:---------------------|:----------|----------:|:-----------------------------------------||16e49729de2d|⭕️exited|twitter_redis|0.0MB|0|redis:latest||62e74fb7138e|⭕️exited|nginx|0.0MB|0|nginx:latest||3a7729ee272b|⭕️exited|sad_lalande|0.0MB|0|192.168.31.245:8081/python:3.10-buster||98df9168bbd5|⭕️exited|rustdesk-hbbr|0.0MB|0|rustdesk/rustdesk-server:1.1.6||d34a102050d3|⭕️exited|minikube|0.0MB|0|kicbase/stable:v0.0.36||1647f82f4f5d|⭕️exited|hardcore_benz|0.0MB|0|ubuntu:latest||6fd8b4c901f1|⭕️exited|competent_ritchie|0.0MB|0|ubuntu:latest||874838b6335d|⭕️exited|twitter_mysql8|0.0MB|0|mysql:8.0||f96ba3157d97|⭕️exited|mystifying_kapitsa|0.0MB|0|sha256:b7fb33a5a7bb||57469356f55b|⭕️exited|heuristic_northcutt|0.0MB|0|192.168.31.245:8081/python:3.10-buster||21b45572fd50|⭕️exited|thirsty_stonebraker|0.0MB|0|sha256:b7fb33a5a7bb||bf19958f710f|⭕️exited|rustdesk-hbbs|0.0MB|0|rustdesk/rustdesk-server:1.1.6||cb0ef103c8f6|✅running|twitter_memcahed|2.09MB|0.008|memcached:latest||aa291a307aac|✅running|rebloom|5.74MB|0.104|redislabs/rebloom:latest||84ef73971e0d|✅running|zilliz_attu|75.91MB|0.022|zilliz/attu:v2.2.7||75f08019e787|✅running|milvus-etcd|77.74MB|0.688|quay.io/coreos/etcd:v3.5.5||98c1082f8e5b|✅running|milvus-minio|87.07MB|0.098|minio/minio:RELEASE.2022-03-17T06-34-49Z||78e26a299331|✅running|public_minio|133.05MB|0.11|minio/minio:RELEASE.2023-09-04T19-57-37Z||7b411cf33283|✅running|rabbitmq3-management|156.2MB|0.477|rabbitmq:3-management||e2618c7ec2ec|✅running|milvus-standalone|317.84MB|4.369|milvusdb/milvus:v2.2.9||c50ca07d3d41|✅running|mysql8|739.54MB|1.026|mysql:8|View container port informationEnter the command in the terminal:idocker portThe following output is obtainedThereisatotalof3container
elk-kibana-7Host->Container5601->56015601->5601elk-elasticsearch-7Host->Container9200->92009200->92009300->93009300->9300rebloomHost->Container6379->63796379->6379