MENU

Docker镜像(CentOS7)运行Nginx报错

May 4, 2017 • Linux

Docker镜像(centos7)运行nginx报错Failed to get D-Bus connection: Operation not permitted

systemctl start nginx.service  
Failed to get D-Bus connection: Operation not permitted

搜了下解决办法需要进行提权操作才可以

docker run --privileged -d -p 10080:80 centos /sbin/init

接着进行docker容器就可以了

docker exec -it ab49ca003950 /bin/bash