The command systemctl status is not working. It never has. My container is on CentOS 7. When I issue systemctl status I get results Failed to get D-Bus connection: operation not permitted.RegressionI then looked into upgrading systemd. I removed the /etc/yum/protected.d/system.conf file. I then used yum remove systemd. I see that systemd version 219-19.el7_2.4 has been installed. I choose N to not actually remove systemd. I then installed systemd-libs-219-19.el7_2.7.x86_64.rpm. I then installed systemd version 2.7. I then used yum remove systemd just to determine the version. I see that systemd version 219-19.el7_2.7 is installed. I choose NO to abort the removal. systemctl status still does not work. I get the same error: Failed to get D-Bus connection: operation not permitted.I tried creating a new Docker container with the -privileged flag. When I used the -p 80:80 option, the Docker run command failed.When I left out the -p 80:80 option in my docker run command, the new container had the same problem.I created a Docker container with a docker run ... -v /sys/fs/cgroup:/sys/fs/cgroup:ro option. I had the same problem.I expect systemctl status to work inside a Docker container.What should I do to get systemctl status to work in a Docker container?
Linux command systemctl status is not working inside a Docker container
centos;systemd;docker