无法在docker容器中使用supervisord运行Openfire

时间:2016-12-11 12:24:44

标签: docker dockerfile openfire supervisord

我正在使用supervisord在docker容器中运行openfire,但是supervisord说该进程已退出但实际上它正在运行时我打开暴露的端口我看到一个openfire仪表板,尽管supervisord仪表板显示已退出

以下是我的容器日志

ContentProvider

这是我的supervisord conf文件

/usr/lib/python2.7/site-packages/supervisor-3.3.1-py2.7.egg/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2016-12-10 02:44:28,562 CRIT Supervisor running as root (no user in config file)
2016-12-10 02:44:28,628 INFO RPC interface 'supervisor' initialized
2016-12-10 02:44:28,630 INFO supervisord started with pid 1
2016-12-10 02:44:29,635 INFO spawned: 'openfire' with pid 7
2016-12-10 02:44:30,734 INFO success: openfire entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-12-10 02:44:30,792 INFO exited: openfire (exit status 0; expected)
2016-12-10 02:46:04,355 INFO spawned: 'openfire' with pid 56
2016-12-10 02:46:04,410 INFO exited: openfire (exit status 1; not expected)
2016-12-10 02:46:05,415 INFO spawned: 'openfire' with pid 65
2016-12-10 02:46:05,464 INFO exited: openfire (exit status 1; not expected)

当我运行Nginx和PHP-FPM时,同样的事情发生在我身上,但是在这种情况下,supervisord不会像在这里看到的那样运行PHPfpm and Nginx not working in Docker with Supervisord

有人可以告诉我这里我做错了什么吗?我是docker的新手,所以我可能会错过一些关键点。

1 个答案:

答案 0 :(得分:0)

您从主管开始的内容必须在前台运行而不是守护自身(请参阅docs)。 而是将命令更改为(相应地修改文件夹):

command=/usr/bin/java -server -DopenfireHome=/usr/share/openfire -Dopenfire.lib.dir=/usr/share/openfire/lib -classpath /usr/share/openfire/lib/startup.jar -jar /usr/share/openfire/lib/startup.jar