我是靠谱客的博主 尊敬金毛,最近开发中收集的这篇文章主要介绍docker报错:System has not been booted with systemd as init system (PID 1). Can‘t operate.,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
docker使用centos7命令 systemctl
报错
$ systemctl status firewalld
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
解决方式
# 运行centos
# docker run -itd --name centos centos /bin/bash
# 替换为:
# 获取systemctl权限
docker run --privileged -itd --name centos centos /usr/sbin/init
# 进入终端
docker exec -it centos /bin/bash
参考
docker报错System has not been booted with systemd as init system (PID 1). Can’t operate. Failed to connect to bus: Host is down
最后
以上就是尊敬金毛为你收集整理的docker报错:System has not been booted with systemd as init system (PID 1). Can‘t operate.的全部内容,希望文章能够帮你解决docker报错:System has not been booted with systemd as init system (PID 1). Can‘t operate.所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复