The solution can not be used systemctl command in the Docker's centos mirror

In D can not use the solution systemctl command within ocker official centos mirror,

Use this command docker error

Failed to get D-Bus connection: Operation not permitted

   

   

Solution:

When you add parameters to run container

--privileged=true

/usr/sbin/init

Complete startup command is:

docker run -itd --name centos7 --privileged=true centos /usr/sbin/init

Guess you like

Origin www.cnblogs.com/withfeel/p/11670692.html