docker systemctl System has not been booted with systemd as init system (PID 1). Can't operate
时间: 2023-09-22 15:13:05 浏览: 131
引用:当使用命令systemctl时,报错信息为"System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down"。
这个错误意味着docker容器内的操作系统没有使用systemd作为初始化系统(PID 1)。在这种情况下,systemctl命令无法正常工作。
解决这个问题的方式是在docker容器内使用一个PID为1的init系统,例如使用supervisord或runit作为init系统。这样就可以正常使用systemctl命令了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [docker报错:System has not been booted with systemd as init system (PID 1). Can‘t operate.](https://blog.csdn.net/mouday/article/details/128449952)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [Docker: System has not been booted with systemd as init system (PID 1). Can‘t operate.](https://blog.csdn.net/m0_46304383/article/details/121483556)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文