I have php-fpm container with installed supervisor. But using command: CMD ["usr/bin/supervisord"]
in Docker file made container finishing with fail(Unlinking stale socket /var/run/supervisor.sock). Run as daemon. But if remove CMD, and run command ourself in bash after container ran, its finish ok.
EDIT: I use Laravel framework, and I need to start queue listener and other processes.
2
Answers
I resolved my issue. I set command
usr/bin/supervisord && php-fpm
and it worked correctly. Without runningphp-fpm
command, the container stops at supervisord and fails.Use webdevops images it contains supervisord without any issue
webdevops/php-nginx:7.4
add your config path in the container is
/opt/docker/etc/supervisor.d/MY_CONF.conf
Don’t assign user when running (supervisor needs root)