xianlubird / mydocker

<<自己动手写docker>> 源码

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

code-3.1运行后/proc/self被修改

tsonglew opened this issue · comments

code-3.1运行./mydocker run -ti ./bin/sh
之前

screen shot 2017-08-22 at 14 01 48

运行之后

screen shot 2017-08-22 at 14 02 42

screen shot 2017-08-22 at 14 04 13

然后要重启才能恢复正常。

求解答。感谢!

commented

Because you have gone into a new namespace after run ./mydocker run -ti ./bin/sh,type exit will back to your host`s namespace.

已经执行过exit了,再exit就退出终端了 @iarwen

commented

# sudo mount -t proc proc /proc have a try~

解决了。谢谢。

@iarwen @xianlubird

Is there better way to fixed this question?

I should use mount -t proc proc /proc every time after try to run mydocker run command, i don't think it's a good idea.