Ниже приведен вывод команды docker run -p 9898:80 myContainer
на стандартный вывод:
2019-01-03 17:23:08,600 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-01-03 17:23:10,109 INFO exited: nginx (exit status 1; not expected)
2019-01-03 17:23:11,115 INFO spawned: 'nginx' with pid 87
2019-01-03 17:23:12,176 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-01-03 17:23:13,681 INFO exited: nginx (exit status 1; not expected)
2019-01-03 17:23:14,683 INFO spawned: 'nginx' with pid 88
2019-01-03 17:23:15,710 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-01-03 17:23:17,214 INFO exited: nginx (exit status 1; not expected)
2019-01-03 17:23:18,218 INFO spawned: 'nginx' with pid 89
2019-01-03 17:23:19,281 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-01-03 17:23:20,787 INFO exited: nginx (exit status 1; not expected)
2019-01-03 17:23:21,788 INFO spawned: 'nginx' with pid 90
2019-01-03 17:23:22,840 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-01-03 17:23:24,344 INFO exited: nginx (exit status 1; not expected)
2019-01-03 17:23:25,346 INFO spawned: 'nginx' with pid 91
2019-01-03 17:23:26,361 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-01-03 17:23:27,869 INFO exited: nginx (exit status 1; not expected)
supervisord.conf:
[supervisord]
nodaemon=true
[program:nginx]
command=/usr/sbin/nginx
[program:php-fpm]
command=/usr/sbin/php-fpm -D
Dockerfile:
from centos
run yes | yum install epel-release -y
run yes | yum install nginx -y
run yes | yum install vim -y
run yes | yum install php-fpm
run yes | yum install supervisor
copy supervisord.conf /etc/supervisord.conf
copy nginx.conf /etc/nginx/nginx.conf
copy index.html /usr/share/nginx/html
copy cal.php /usr/share/nginx/html
copy 404.html /usr/share/nginx/html
CMD ["/usr/bin/supervisord"]
Я могу получить доступ к веб-серверу с хост-машины, и php-код также обрабатывается установленным там php-fpm.
Я беспокоюсь о частом перезапуске, необходимом для nginx супервизором. Что я делаю не так?
PS: Пожалуйста, уточните детали, прежде чем понизить вопрос. Я отправил после достаточного исследования самостоятельно. Это мое последнее средство !!!