docker容器中的supervisor.sock拒绝连接
我尝试通过supervisorctl unix:///var/run/supervisor.sock refused connection和Overlayfs does not work with unix domain sockets来解决它。
然而,在我的 debain 服务器上仍然无法正常工作。
这是我的 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:"]
这是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
我尝试执行
sudo docker run --tmpfs /var/run -v $(pwd):/app test
但是它得到的结果是“unix:///var/run/docker_supervisor.sock拒绝连接”