Docker Community Forums

Share and learn in the Docker community.

How to start/stop services with systemctl on CentOS/RedHat 7

Hi !

I tried to use systemctl to start and stop services on my RedHat container, but i had an error :
Failed to get D-Bus connection: Operation not permitted

I found many topics about this error :



I tried, in my docker run command :

    • to use --privileged option
    • to use --security-opt seccomp=unconfined option
    • to use --cap-add SYS_ADMIN option
    • to add /sys/fs/cgroup:/sys/fs/cgroup:ro volume
    • to add --tmpfs /run and --tmpfs /run/lock options
    • i also did the commands in the previous redhat link

Unfortunatly, none of this solution worked …

I’m using a RedHat Entreprise Linux Server 7.3 and Docker 17.03.2-ee-4 with 1.27 API version

Thank you so much for any help :slight_smile:

Regards

1 Like