您现在的位置是:首页 > 文章详情

CentOS 7系统,Docker想启用userns-remap,傻了吧?

日期:2018-05-16点击:441

今天想启用这个功能,

这样,docker里的root用户,就不用是宿主机的root用户,

安全性可以提高一个层次。

于是找了文档,对比了配置,default用了,自定义用了,

结果呢?

傻眼了~~~~全都失败。


~~~~~~~~~~~~~~~~~~~~

花了几小时,再想找找为何失败,

结果,原来在centos/rhel中, user namespaces只是一个预览功能。

要用命令才能开启!!!!

OMG,不知敢不敢用了。


http://cache.baiducontent.com/c?m=9d78d513d9951cfe01bad4690d6790274e1497624c8b91027ea48448e5735a310731bce8653657448dca262147ed084beb832b6f675d7de28cc8ff1b9cedce3f2fff7b633601d31453985eaaca44389260d601b8f14efaeca774c0f58c92c25158ce50067f87f3&p=c27ec54ad5c516f30be296605055&newp=8b2a970e8ed505fd11bd9b7d0b4092695803ed633fd6d301298ffe0cc4241a1a1a3aecbf2025110fd7c2786703a44b58ecf03273330834f1f689df08d2ecce7e64d031702255&user=baidu&fm=sc&query=docker+userns-remap&qid=a68e3d2a000023c9&p1=11


https://segmentfault.com/q/1010000010909708

https://bugzilla.redhat.com/show_bug.cgi?id=1349704


========================

grubby --args="user_namespace.enable=1" --update-kernel="$(grubby --default-kernel)" reboot 

If you're using CentOS 7, there are two things you need to know.

1.User Namespaces is not enabled on the kernel by default. You can enable it by executing the following command and restart the system.

sudo grubby --args="user_namespace.enable=1" \ --update-kernel=/boot/vmlinuz-3.10.0-XXX.XX.X.el7.x86_64
The user namespaces are "Technology Preview" and disabled by default, see kernel implementation https://bugzilla.redhat.com/show_bug.cgi?id=1138782 If I good remember you need to enable it on kernel command line (something like grubby --args=user_namespace.enable=1 + reboot).
原文链接:https://yq.aliyun.com/articles/593773
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章