k8s或者docker容器在安装服务之后,用systemctl启动会报错:connection: Operation not permitted

这个问题不大,加上这两个红的就ok了。

docker run -d -it --privileged nginx-1 /usr/sbin/init

因为如果要是用systemctl 管理服务就要加上参数 --privileged 来增加权,并且不能使用默认的bash,换成 init

猜你喜欢

转载自www.cnblogs.com/xingyunfashi/p/12322019.html
今日推荐