我知道在码头集装箱中使用多个终端是很奇怪的。Ahow在Docker容器中使用多个终端?
我的目的是测试一些命令并最终用这些命令建立一个dockerfile。 所以我需要使用多个终端,比如两个。一个是运行一些命令,另一个是用来测试命令。
如果我使用真机,我可以ssh使用多个终端,但是在docker中,我该怎么做?
也许解决的办法是将run
码头与CMD /bin/bash
,并在该bash中,使用screen
?
编辑 In my situation, one shell run a server program, the other run a client program to test the server program. Because the server program and client program are compiled together. So, the default link method in docker is not suitable.
不知道我明白。你需要多一个shell?像一个运行命令,第二个运行尾部日志? – michaelbn 2014-09-29 09:56:27
类似的东西,一个shell运行一个服务器程序,另一个运行一个客户端程序来测试服务器程序。 – HaveF 2014-09-29 10:23:28