I ran into a socket.error when I tried to start my supervisor in Docker. The following is the commands:
RUN apt-get install -y supervisor
COPY websocket.conf /etc/supervisor/conf.d
RUN supervisord -c /etc/supervisor/supervisord.conf
RUN supervisorctl update
in supervisorctl update it log an error: error:
It can be run sucessfully if I log in to the container terminal to run the command but fail in Dockerfile
Supervisor doesn't have any awareness of Docker or special features for it, but a possibility is the following:
RUN supervisord -c /etc/supervisor/supervisord.conf
RUN supervisorctl update
In the first command you're explicitly giving supervisord the path of the configuration file. In the second command, you're asking supervisorctl to search for the configuration file, which may have different results. If you specify -c to both, you can ensure they are both using the same configuration file.
I am going to close this issue because it seems to be an installation or configuration issue. If you can show it's a bug in Supervisor, we can reopen.
Most helpful comment
Supervisor doesn't have any awareness of Docker or special features for it, but a possibility is the following:
In the first command you're explicitly giving
supervisordthe path of the configuration file. In the second command, you're askingsupervisorctlto search for the configuration file, which may have different results. If you specify-cto both, you can ensure they are both using the same configuration file.I am going to close this issue because it seems to be an installation or configuration issue. If you can show it's a bug in Supervisor, we can reopen.