Docker Centos7- Failed to get D-Bus connection: Operation not permitted failed to find PGDATA

The above error occurs in Docker. We need to use the command when starting the Centos 7 image

sudo docker run -idt -p 8880:8069 -p 8881:22 --name Centos8880 --privileged=true centos:centos7 /usr/sbin/init

Add parameters:

--privileged=true
/usr/sbin/init

You can use systemctl to start the service

Guess you like

Origin blog.csdn.net/u012798683/article/details/108222670