简体   繁体   中英

container running in privileged mode

I am new to Docker, I have a centos image running as a container inside the docker in privileged mode. I want to perform some operations on this image but I can't the root. how I can perform the operations on this image when I stated it in privileged mode. this is the outcome when I run it in privileged mode

The --privileged option does not give you more privileges in the container, but gives the container more privileges. For example it can then access devices.

When you want to be root in the running container, you can add option -u 0 to the docker run command.

我通过运行这个命令打开容器的新实例解决了这个问题sudo docker exec -i -t a6f7c25afbbf /bin/bash

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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