Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想运行一个 docker 或 LXC 容器,但限制对容器本身的访问。具体来说,是否可以阻止根(主机上的根)访问容器?从访问,我的意思是 SSH 进入容器,tcpdump tx/rx 放入容器,分析应用程序等。
谢谢!
无法有效地限制主机上的特权用户检查或访问容器。如果是这样的话,很难想象 root 用户怎么可能一开始就启动容器。
通常,记住容器化用于将进程限制在受限空间中很有用:它用于防止进程离开主机,而不是阻止其他进程进入。