如何让Docker运行完整的参数? [英] How to get `docker run` full arguments?

查看:159
本文介绍了如何让Docker运行完整的参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我通过 docker运行docker运行-d --name sonarqube -p 19000:9000 -p 19002:9002 -e SONARQUBE_JDBC_USERNAME = sonar -e SONARQUBE_JDBC_PASSWORD = 123 --link sonarqube- mysql:mysql

然后我丢失了我的shell命令历史记录,但是我想知道我所有的参数。
我怎么能得到他们? (我需要复制/移动/重新启动容器的参数)

Then I lost my shell command history, but I want to know all my arguments. How can I get them? (I need the arguments to copy/move/restart container)

推荐答案

当然 docker inspect 是要去的,但是如果你只想重建docker运行命令,你有

Of course docker inspect is the way to go, but if you just want to "reconstruct" the docker run command, you have

https://github.com/nexdrew/rekcod

它说

从现有容器(通过码头检查)逆向工程一个码头运行命令。

这篇关于如何让Docker运行完整的参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆