标签:docker Failed to get D-Bus
Docker容器使用问题:Failed to get D-Bus connection: Operation not permitted
在CentOS7 中,docker容器中yum 安装完mysql后,启动mysqld报错
# systemctl start mysqld
Failed to get D-Bus connection: Operation not permitted
解决办法:
生成容器:
#docker run -itd -name mysql mysql-yum-install /usr/sbin/init
进入容器:
# docker exec -it mysql /bin/bash
这样可以使用systemctl启动服务了。
执行代码:
[root@vm ~]# docker run -itd --name mysql mysql-yum-install /usr/sbin/init
fc57c212614e013f22720ba471d5dd0ba0c203e629500818a568f55c7bfd1775
[root@vm ~]# docker exec -it mysql /bin/bash
[root@fc57c212614e /]# systemctl start mariadb
[root@fc57c212614e /]#
Docker 报错 Failed to get D-Bus connection
标签:docker Failed to get D-Bus
原文地址:http://blog.51cto.com/fengyunshan911/2113979