本文介绍了在容器中运行服务(upstart / init.d)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在尝试在Docker中启动一个有很多初始化和启动服务的系统, initctl:无法连接到Upstart:无法连接到socket / com / ubuntu / upstart:连接拒绝 所有的解决方法建议使用/ bin / true的硬链接来使错误无效。但是我需要这些服务由upstart管理重新启动能力,并且upstart发射事件工作... 由于看起来docker不支持这一点,考虑到编写脚本来启动/etc/rcX.d中的所有服务的总体缺陷,并跟踪PID。这不能解决从upstart发出的事件的缺乏。 任何其他想法如何在docker中启动upstart进程?解决方案不幸的是,upstart在docker容器中不起作用,因为它们对init系统有一些魔力。 问题解释: I'm trying to launch a system in docker that has many init and upstart services and I get this error.initctl: Unable to connect to Upstart:Failed to connect to socket /com/ubuntu/upstart: Connection refusedAll the workarounds suggest making a hard link to /bin/true to silence the error. But I need to have these services managed by upstart for restart-ability and for upstart emit events to work...As it seems docker does not support this, I'm considering the gross hack of writing a script to launch all the services in /etc/rcX.d and keep track of the PIDs. That doesn't solve lack of emit events from upstart.Any other ideas how to launch upstart processes in docker? 解决方案 Unfortunately, upstart does not work inside of a docker container because they do some magic with the init system.This issue explains:And this one says: 这篇关于在容器中运行服务(upstart / init.d)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-23 19:03