欢迎光临
Life Is Becoming Better

docker 中执行 systemctl Failed to get D-Bus connection: No such file or directory

操作

ubuntu docker容器中执行 systemctl 命令

报错

systemctl Failed to get D-Bus connection: No such file or directory

解决方法

ubuntu中

在运行容器的时候 加入–privileged=true 和 /sbin/init,实测有效

docker run -itd –name test –privileged=true ubuntu:16.04 /sbin/init

未经允许不得转载:Donghy的博客 » docker 中执行 systemctl Failed to get D-Bus connection: No such file or directory

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址