非常令人沮丧的错误。我希望你能给我一些建议。
我删除了所有映像,所有容器,并使用docker对系统进行了修剪。
然后,我运行以下命令。我知道我没有指定mysql主机和密码,但是谁在乎,这仍然可以正常工作或向我显示phpmyadmin的主页,我可以在其中登录,并且应该说mysql无法连接。
sudo docker run --name adminphp1 -d -p 8000:80 phpmyadmin/phpmyadmin
。
运行此命令后,看到容器列表,向我显示以下内容:
389268e87d4b phpmyadmin/phpmyadmin "/run.sh supervisord…" 2 minutes ago Up 2 minutes 9000/tcp, 0.0.0.0:8000->80/tcp adminphp1
9000 / tcp来自哪里?
运行docker logs adminphp1
后,它显示以下内容:
Complete! phpMyAdmin has been successfully copied to /var/www/html
/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 '
2019-04-11 15:15:09,745 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2019-04-11 15:15:09,746 INFO Included extra file "/etc/supervisor.d/nginx.ini" during parsing
2019-04-11 15:15:09,746 INFO Included extra file "/etc/supervisor.d/php.ini" during parsing
2019-04-11 15:15:09,756 INFO RPC interface 'supervisor' initialized
2019-04-11 15:15:09,756 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2019-04-11 15:15:09,756 INFO supervisord started with pid 1
2019-04-11 15:15:10,760 INFO spawned: 'php-fpm' with pid 21
2019-04-11 15:15:10,762 INFO spawned: 'nginx' with pid 22
[11-Apr-2019 15:15:10] NOTICE: fpm is running, pid 21
[11-Apr-2019 15:15:10] NOTICE: ready to handle connections
2019-04-11 15:15:11,826 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-11 15:15:11,827 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
然后我尝试使用website.com:8000进行访问,浏览器显示我经过了一段时间后无法访问该网站。
只要您能提出建议,我们将不胜感激。