我刚读了一篇关于Docker的THIS文章,这篇文章描述了如何将一个简单的应用程序停靠.执行以下命令:
$docker run -t -i ubuntu:14.04 /bin/bash,
然后,给出以下解释:
Here we’ve again specified the docker run command and launched an
ubuntu:14.04 image. But we’ve also passed in two flags: -t and -i. The
-t flag assigns a pseudo-tty or terminal inside our new container and the -i flag allows us to make an interactive connection by grabbing
the standard in (STDIN) of the container.
我不明白其含义:
-i flag allows us to make an interactive connection by grabbing the standard in (STDIN)
谢谢.
最佳答案
Docker的-i / – interactive允许您通过标准输入(“STDIN”)向容器发送命令,这意味着您可以“交互式”地将命令输入到-t开关创建的伪tty /终端.
原文链接:https://www.f2er.com/docker/436997.html