摘要: 方法1:分步实现 ps -eo 'pid,cgroup'|grep -v grep |grep <宿主机PID> 会输出一个长字符串,进行第二步: docker ps --no-trunc|grep <刚刚输出的长字符串> 最终获得容器号 方法2:bashrc中定义命令 在~/.bashrc 中添加 阅读全文
posted @ 2025-11-17 14:34 shangrain 阅读(1) 评论(0) 推荐(0)