Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
23
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

Failed to get D-Bus connection: No connection to service manager.の対処

参考

Failed to get D-Bus connection: No connection to service manager.

bash-4.2# systemctl
Failed to get D-Bus connection: No connection to service manager.

対処方法

  • 特権モードにする(--privileged)
  • コンテナで起動されるコマンドは/sbin/initにする
sudo docker run --privileged -d -p 80:80 --name httpd1 tukiyo3/centos-ja:7.0 /sbin/init
nsenterを使用してコンテナに入る。
sudo nsenter -t $(sudo docker inspect --format '{{.State.Pid}}' httpd1) -m -u -i -n -p /bin/sh
  • これでsystemctlが使える。

その他の方法

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
23
Help us understand the problem. What are the problem?