执行 docker 图像时出错

Error while execing a docker image

我正在构建来自 CentOs 7.2 docker image 的 CentOS 映像 CentOS 7.2.1511。

在我 运行 带有命令的图像之后 docker run -d --name centos centos

我执行了一个新的 shell docker exec -user root centos

在新的 shell 中,我尝试安装 mysql 并使用命令启动 mysql。 service mysqld start

mysqld 启动命令失败并显示以下消息

Failed to get D-Bus connection: Operation not permitted.

知道这里的问题是什么吗?

请使用此命令启动

CMD ["/usr/sbin/init"]