Docker的主管没有';行不通
我与Docker的主管没有';行不通,docker,supervisord,Docker,Supervisord,我与docker中的supervisor有问题。我使用supervisor启动4个.sh脚本:datagrid.sh,ml.sh,startmap.sh和dirwatcher.sh 当我打开容器时,导航到脚本目录并尝试手动启动脚本,一切正常,脚本都会启动,但不会在启动时启动。我想问题出在主管身上。多谢各位 错误: 2018-08-08 12:28:08,512 INFO spawned: 'datagrid' with pid 171 2018-08-08 12:28:08,514 INFO s
docker
中的supervisor
有问题。我使用supervisor
启动4个.sh
脚本:datagrid.sh
,ml.sh
,startmap.sh
和dirwatcher.sh
当我打开容器时,导航到脚本目录并尝试手动启动脚本,一切正常,脚本都会启动,但不会在启动时启动。我想问题出在主管身上。多谢各位
错误:
2018-08-08 12:28:08,512 INFO spawned: 'datagrid' with pid 171
2018-08-08 12:28:08,514 INFO spawned: 'dirwatcher' with pid 172
2018-08-08 12:28:08,517 INFO spawned: 'startmap' with pid 173
2018-08-08 12:28:08,519 INFO spawned: 'ml' with pid 175
2018-08-08 12:28:08,520 INFO exited: datagrid (exit status 0; not expected)
2018-08-08 12:28:08,520 INFO exited: dirwatcher (exit status 0; not expected)
2018-08-08 12:28:08,520 INFO exited: startmap (exit status 0; not expected)
2018-08-08 12:28:08,520 INFO exited: ml (exit status 0; not expected)
2018-08-08 12:28:08,527 INFO gave up: datagrid entered FATAL state, too many start retries too quickly
2018-08-08 12:28:08,532 INFO gave up: ml entered FATAL state, too many start retries too quickly
2018-08-08 12:28:08,537 INFO gave up: startmap entered FATAL state, too many start retries too quickly
2018-08-08 12:28:08,539 INFO gave up: dirwatcher entered FATAL state, too many start retries too quickly
我的supervisord.conf
文件:
[supervisord]
nodaemon=false
[program:datagrid]
command=sh /EscomledML/MLScripts/escomled_data_grid.sh start -D
[program:dirwatcher]
command=sh /EscomledML/MLScripts/escomled_dirwatcher.sh start -D
[program:startmap]
command=sh /EscomledML/MLScripts/escomled_startmap.sh start -D
[program:ml]
command=sh /EscomledML/MLScripts/escomled_ml.sh start -D
我在容器中使用alpine linux。这里几乎没有问题
[supervisord]
nodaemon=true
此配置使Supervisord本身作为前台进程运行,这将保持容器正常运行
[program:datagrid]
command=sh /EscomledML/MLScripts/escomled_data_grid.sh start -D
autorestart=unexpected
exitcodes=0
尝试一些人在docker中使用它:我是docker的新手,你能给我更多的信息吗?也许这会有帮助:它会继续运行这个Hello,我似乎无法使
不朽。运行开始工作。我不知道在容器中指定要运行的脚本的位置。你能帮我吗?嗨,只需克隆repo并在dir dodocker build-t test personal
中执行,然后docker run-it--privileged test personal.
我一直在寻找一个类似问题的解决方案,效果非常好!为什么我们不能有两个主流程?我们需要docker上下文之外的配置吗?如果我们使用的是apache,为什么还要停止apache呢?