简体   繁体   English

RUN systemctl启动newrelic-infra,错误:无法获得D-Bus连接:不允许操作

[英]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 systemctlcent 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.

相关问题 无法获得 D-Bus 连接:不允许操作 - Failed to get D-Bus connection: Operation not permitted Docker:无法获得 D-Bus 连接,不允许操作 - Docker: Failed to get D-Bus connection, Operation not permitted 使用 docker 文件错误构建映像:无法获得 D-Bus 连接:不允许操作 - Build image with docker file error: Failed to get D-Bus connection: Operation not permitted amazonlinux:2 systemctl 未能获得 D-Bus 连接 - amazonlinux:2 systemctl Failed to get D-Bus connection 在Dockerfile中启动Gunicorn服务:无法获得D-Bus连接:不允许操作 - Starting Gunicorn Service in Dockerfile : Failed to get D-Bus connection: Operation not permitted 在docker容器中启动服务失败,错误:无法获得D-Bus连接:没有与服务管理器的连接 - Start a service in docker container failed,with error: Failed to get D-Bus connection: No connection to service manager 来自docker容器内部的systemctl失败,出现D-Bus连接错误 - systemctl from inside docker container fails with D-Bus connection error 无法获得D-Bus连接-Docker容器中的httpd服务 - Failed to get D-Bus connection - httpd service in Docker container Kubernetes Pod:无法获得 D-Bus 连接 - Kubernetes Pod: Failed to get D-Bus Connection Docker centos7 systemctl deos无法正常工作:无法连接D-bus - Docker centos7 systemctl deos not work : Failed to connect D-bus
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM