supervisor.sock refused connection in Docker container
I tried to fix this with supervisorctl unix: ///var/run/supervisor.sock refused connection And Overlayfs does not work with unix domain sockets
However, it still does not work on my debain server.
Here is my docker_supervisor.conf
FROM python:2.7
RUN pip install supervisor
RUN mkdir /app
WORKDIR /app
COPY docker_supervisor.conf /app
RUN supervisord -c docker_supervisor.conf
CMD ["supervisorctl", "-c", "docker_supervisor.conf", "restart", "apiapp:"]
Here is docker_supervisor.conf
[unix_http_server]
file=/var/run/docker_supervisor.sock
chown=root:root
chmod=0777
[supervisord]
logfile=/var/run/docker_supervisor.log
pidfile=/var/run/docker_supervisor.pid
[rpcinterface:supervisor]
supervisor.rpcinterface_factory =
supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/docker_supervisor.sock
[group:apiapp]
programs=api_web
[program:api_web]
user=root
directory=/app
command=python echo "OKOKOK"
sudo docker build --no-cache -t test .
Successfully built c3b4061fc9f7
sudo docker run -v $(pwd):/app test
unix:///var/run/docker_supervisor.sock refused connection
I tried to execute
sudo docker run --tmpfs /var/run -v $(pwd):/app test
But it gets the same result: "unix: ///var/run/docker_supervisor.sock connection refused"
How to fix this and run the supervisor in the container?
source
share