使用 docker logs 查看。CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] 没有日志。但容器启动不起来,attach 过去提示:You cannot attach to a stopped container, start it first。
如果单纯使用 CMD ["/usr/bin/supervisord"] 会得到下面的结果:
/usr/lib/python2.7/site-packages/supervisor/
options.py:461: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '
/usr/lib/python2.7/site-packages/supervisor/
options.py:461: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '
Unlinking stale socket /run/supervisord.sock