Ask Ubuntu上有人问怎么能login或者ssh一个运行的docker容器。
例如
|
|
想进行这样的登录:
|
|
The answer is docker's attach
command. So for my example above the solution will:
|
|
UPDATE: (docker >= 1.3) Thanks to WiR3D user who suggested another way to get container's shell. If we use attach we can use only one instance of shell. So if we want open new terminal with new instance of container's shell, we just need run the following:
|
|