RUN systemctl start newrelic-infra,error:无法获得D-Bus连接:不允许操作

问题描述 投票:1回答:1

运行systemctl在cent os 7上启动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个回答
0
投票

安装的卷可以在容器的运行时期间工作,但在构建期间不工作。

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

© www.soinside.com 2019 - 2024. All rights reserved.