国产欧美日韩第一页|日本一二三不卡视频|在线精品小视频,亚洲第一免费播放区,metcn人体亚洲一区,亚洲精品午夜视频

幫助中心 >  技術(shù)知識(shí)庫(kù) >  云服務(wù)器 >  服務(wù)器教程 >  docker報(bào)錯(cuò):Failed to get D-Bus connection Operation not permitted的解決辦法

docker報(bào)錯(cuò):Failed to get D-Bus connection Operation not permitted的解決辦法

2024-01-05 17:34:13 1297

docker報(bào)錯(cuò):Failed to get D-Bus connection Operation not permitted的解決辦法


問(wèn)題:

Docker使用centos7鏡像創(chuàng)建容器后,在里面使用systemctl啟動(dòng)服務(wù)報(bào)錯(cuò):

Failed to get D-Bus connection: Operation not permitted

問(wèn)題復(fù)現(xiàn):

#docker run -itd --name centos7 centos:7

#docker attach centos7

#yum install vsftpd

image.png

image.png

#systemctl start vsftpd

報(bào)錯(cuò):Failed to get D-Bus connection: Operation not permitted

image.png

解決辦法:

先把原先創(chuàng)建的容器停止服務(wù)并移除

#docker stop centos7

#docker rm centos7

image.png

以特權(quán)模式運(yùn)行容器。

#docker run -d --name centos7 --privileged=true centos:7 

image.png

進(jìn)入容器:

#docker exec -it centos7 / bin / bash

#yum install vsftpd

#systemctl start vsftpd

image.png

image.png

啟動(dòng)正常。


提交成功!非常感謝您的反饋,我們會(huì)繼續(xù)努力做到更好!

這條文檔是否有幫助解決問(wèn)題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問(wèn)題: