Docker的 privileged 选项解析(特权模式:赋予容器几乎与主机相同的权限)
DockerRuntime privilege and Linux capabilities
参考官方文档:Docker run reference
By default, Docker containers are “unprivileged” and cannot, for example, run a Docker daemon inside a Docker container. This is because by default a container is not allowed to access any devices, but a “privileged” container is given access to all devices (see the documentation on cgroups devices).
The –privileged flag gives all capabilities to the container. When the operator executes docker run –privileged, Docker will enable access to all devices on the host as well as set some configuration in AppArmor or SELinux to allow the container nearly all the same access to the host as processes running outside containers on the host. Additional information about running with –privileged is available on the Docker Blog.
Read more...