xianlubird / mydocker

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

seems wrong with "user namespace"

wbtlb opened this issue · comments

commented

i just test "user namespaces", and i found after run my code, it will exit status 1

Refer #13

4.2+的内核中userns的使用方式变化导致operation not permitted
Centos 7.x中的内核不支持userns

commented

我的内核版本是3.10的,也会有这种问题吗?

@wbtlb 3.10还不支持userns

commented

但我看您的文档上面写userns 内核版本不是从3.8就开始支持了?

@wbtlb 我说的不够严谨,特性是在3.8中加进去的,但很多发行版的3.10的内核(特别是centos/redhat)并没有把它编译到内核中,所以不支持。

建议使用我们书中推荐的的ubuntu 14.04 + 3.13的内核测试。

commented

好的,感谢您的解答。

commented

另外,那在内核3.10中,docker是如何实现userns的呢?

@wbtlb docker默认是不会创建userns的,只有指定了user-mapping才会做userns,在那个时候会判断是否能支持,不支持就直接报错了。

commented

学习了,再次感谢。