【问题标题】:RUN systemctl start newrelic-infra,error :Failed to get D-Bus connection: Operation not permittedRUN systemctl start newrelic-infra,error :Failed to get D-Bus connection: Operation not allowed
【发布时间】:2019-07-24 17:33:00
【问题描述】:

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 centos newrelic systemctl


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2015-04-24
      • 2018-03-11
      • 1970-01-01
      • 2022-07-07
      • 1970-01-01
      • 1970-01-01
      • 2015-09-01
      • 2012-01-16
      • 2022-08-03
      相关资源
      最近更新 更多