我正在尝试在docker中启动一个具有许多init和upstart服务的系统,我得到了这个错误.
initctl: Unable to connect to Upstart:
Failed to connect to socket /com/ubuntu/upstart: Connection refused
所有的解决方法都建议与/ bin / true建立硬链接以使错误无效.但我需要让upstart管理这些服务以实现restart-ability和upstart发出事件才能工作……
因为似乎docker不支持这个,我正在考虑编写脚本以启动/etc/rcX.d中的所有服务并跟踪PID的严重破解.这并不能解决来自暴发户的缺乏发射事件的问题.
有关如何在docker中启动新手进程的任何其他想法?
这issue说明:
If your application uses upstart,this wont fit well in bare docker images,and even more if they divert /sbin/init or
/sbin/initctl to something like /bin/true or /dev/null.
You application may use service to start if this one has an old school systemV initscript and if the initctl command has not been
diverted.In the case of salt-minion,on ubuntu the packaging uses an upstart
job and no classical init script so it is normal that it wont start in
both cases.
而this one说:
Because Docker replaces the default /sbin/init with its own,there’s
no way to run the Upstart init inside a Docker container.