简体   繁体   English

以root身份在生产环境中运行docker容器是否安全?

[英]Is it safe to run docker container in production as root?

How safe it is to run docker container as root user in production environment ? 在生产环境中以root用户身份运行docker容器有多安全? Is this standard practice or it is recommended to run docker container as non root user ? 是这种标准做法还是建议以非root用户身份运行docker容器?

Edit : 编辑:

My question assumes running docker daemon, docker client and application inside docker as root ( everything as root docker server, client and application inside container ) 我的问题假设以root用户身份在docker内部运行docker守护进程,docker客户端和应用程序(所有内容都作为容器内的root docker服务器,客户端和应用程序运行)

It is safer, and better practice, to run as non-root, both in docker and non-docker environments. 在docker和非docker环境中以非root用户身份运行是更安全和更好的做法。 However, running as root within a docker container is at least somewhat less dangerous than running as root directly in the primary OS, but definitely for a production system running as root is pretty much unheard of by any company with even the most basic security concerns. 但是,在Docker容器中以root身份运行至少比直接在主操作系统中以root身份运行的危险要小一些,但是对于以root身份运行的生产系统来说,即使是最基本的安全问题,也绝对没有任何公司听说过。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM