内容简介:docker Failed to get D-Bus connection: Operation not permitted 解决办法
系统用的是centos7.3,docker1.12,不管是在生成镜像时,或者是在容器内,如果用的 systemctl,service命令就会报Failed to get D-Bus connection: Operation not permitted。有人说centos7.2以后,就没有这个问题了,我用的7.3一样会有这样的问题。
1,后台运行的模式启动
$ docker run --name mynginx --privileged -d -e "container=docker" tankzhang/centos_nginx:v1 /usr/sbin/init
如果是交互模式,也就是-d换成-it,是进不去的,会提示你输入用户名和密码。
$ docker run --name mynginx --privileged -it -e "container=docker" tankzhang/centos_nginx:v1 /usr/sbin/init 。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 CentOS Linux 7 (Core) Kernel 3.10.0-123.el7.x86_64 on an x86_64 a1599b5ac6cc login: Password:
2,docker exec进入到容器内
docker systemctl 启动
不要通过docker attach进入容器,因为根本进不去,并且会导致容器退出。
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Algorithms Unlocked
Thomas H. Cormen / The MIT Press / 2013-3-1 / USD 25.00
Have you ever wondered how your GPS can find the fastest way to your destination, selecting one route from seemingly countless possibilities in mere seconds? How your credit card account number is pro......一起来看看 《Algorithms Unlocked》 这本书的介绍吧!