工具安装:
pip install runlike
用法:
runlike [OPTIONS] [CONTAINER_ID]
Shows command line necessary to run copy of existing Docker container.
Options:
–no-name Do not include container name in output
-p, --pretty
-s, --stdin
–help
其中[CONTAINER_ID]
可以通过docker ps
命令取到
例子:
runlike 3edbb0c882a1
runlike 3edbb0c882a1 -p