栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

查看正在运行的docker容器启动的run命令的几种方法

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

查看正在运行的docker容器启动的run命令的几种方法

1.使用带格式化的inspect命令
docker inspect 
  --format "$(curl -s https://gist.githubusercontent.com/efrecon/8ce9c75d518b6eb863f667442d7bc679/raw/run.tpl)" 
  <容器名>|<容器ID>
2.使用docker run命令
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro 
    assaflavie/runlike <容器名>|<容器ID>

或者

alias runlike="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro assaflavie/runlike"

runlike <容器名>|<容器ID>
3.安装runlike软件
sudo apt install python-pip
sudo pip install runlike
runlike -p <容器名>|<容器ID>

参考

https://stackoverflow.com/questions/32758793/how-to-show-the-run-command-of-a-docker-container#

https://blog.csdn.net/qq_33355821/article/details/110201460

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/860088.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号