[英]RUN systemctl start newrelic-infra,error :Failed to get D-Bus connection: Operation not permitted
RUN systemctl start newrelic-infra (while building docker file) on cent os 7 RUN systemctl在cent os 7上启动newrelic-infra (同时构建docker文件)
We obtain the following error message: 我们获得以下错误信息:
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
Even after including these steps in docker file, 即使将这些步骤包含在docker文件中,
I am getting the same error. 我遇到了同样的错误。 How do we resolve it
我们该如何解决
The mounted volume may work during runtime of the container but not during build. 挂载的卷可能在容器的运行期间起作用,但在构建期间却无法起作用。
In many cases you do not need to run systemd in container anyway as you can run "systemctl" commands with the docker-systemctl-replacement scripts. 在许多情况下,无论如何都不需要在容器中运行systemd,因为可以使用docker-systemctl-replacement脚本运行“ systemctl”命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.