解决docker容器运行supervisor报错“Unlinking stale socket tmpsupervisor.sock”

it2025-12-29  2

通过docker run -d 方式启动容器报“Unlinking stale socket /tmp/supervisor.sock”错误,而通过docker run -it 启动后手动执行 /usr/bin/supervisord -c /etc/supervisor.conf则没问题

解决:

将Dockerfile中的

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

修改成

ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]

重新生成镜像,用该镜像启动容器docker run -d即可,问题解决。

最新回复(0)