Published on

解决Docker容器内使用systemctl报错"Failed to get D-Bus connection: Operation not permitted

Authors
  • avatar
    Name
    Duckweeds7
    Twitter

在 docker 容器内使用 systemctl 时报错:

systemctl
Failed to get D-Bus connection: Operation not permitted

网上查了原因应该是权限问题,需要在启动的时候加入一些参数,如下:

docker run xxxx --privileged=true [image] init