docker容器systemctl启动服务报错解决方法

报错:Failed to get D-Bus connection: Operation not permitted

解决方法:

1、备份文件

mv /usr/bin/systemctl /usr/bin/systemctl.old

2、下载systemctl文件

curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py > /usr/bin/systemctl

3、赋予权限

chmod +x /usr/bin/systemctl
posted @ 2025-01-13 11:20  awks  阅读(405)  评论(0)    收藏  举报