Start a service in docker container failed,with error: Failed to get D-Bus connection: No connection to service manager
I installed docker image and built a image successfully. When I ssh to the container and run the command service xxx start , an error popped: service nginfra start Redirecting to /bin/systemctl start nginfra.service /sbin/service: line 79: /bin/systemctl: No such file or directory Actually, fakesystemd is installed in the container instead of systemd . So I removed fakesystemd and installed systemd with the command: yum swap -- remove fakesystemd -- install systemd systemd-libs But I still can't start the service: service nginfra start Redirecting to /bin/systemctl start nginfra.service Failed