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