docker - 运行 systemctl 启动 newrelic-infra,错误 :Failed to get D-Bus connection: Operation not permitted

标签 docker centos newrelic systemctl

cent os 7

上运行 systemctl start newrelic-infra(同时构建 docker 文件)

我们收到以下错误消息:

Step 28/28 : RUN systemctl  start newrelic-infra
 ---> Running in f9a82da02f00
**Failed to get D-Bus connection: Operation not permitted**
The command '/bin/sh -c systemctl  start newrelic-infra' returned a non-zero code: 1

即使在 docker 文件中包含这些步骤之后,

docker file

我遇到了同样的错误。我们如何解决它

最佳答案

挂载的卷可能在容器运行期间工作,但在构建期间不工作。

在许多情况下,您不需要在容器中运行 systemd,因为您可以使用 docker-systemctl-replacement 运行“systemctl”命令。脚本。

关于docker - 运行 systemctl 启动 newrelic-infra,错误 :Failed to get D-Bus connection: Operation not permitted,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54965720/

相关文章:

java - 外部化 spring boot 配置

python - 从 UI 执行 Linux 命令(Html 页面)

python - 将 newrelic 添加到通过 dokku 部署的 python 堆栈 (django)

java - 应用程序响应时间与事务服务器时间

node.js - 如何使用 google/node-runtime 镜像在 Docker 中运行 Ghost?

docker - Jenkins-Docker构建时间

date - 在 Linux 中将 x 秒添加到当前日期

c# - BeginProcessRequest() 中发生了什么?

Docker 构建找不到文件

docker - 如何从docker容器内部访问主机中的目录?