我尝试创建一个phpmyadmin docker,该命令已成功执行,但是当我访问localhost:8080时,它冻结并且没有任何内容出现。
我创建了我的docker phpmyadmin:
docker run --name myadmin -d --link mysql:mysql -e MYSQL_USERNAME=root -e MYSQL_ROOT_PASSWORD=root -p 8080:80 -d phpmyadmin/phpmyadmin
我的数据库创建时间:
sudo docker run --name mysql -p 3306:3306 -v /home/user/dev/mysql_data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:latest
我在Ubuntu 16.04上。
感谢您的帮助。
编辑:
docker logs myadmin
2017-05-02 01:03:28,815 CRIT Supervisor running as root (no user in config file)
2017-05-02 01:03:28,815 WARN Included extra file "/etc/supervisor.d/nginx.ini" during parsing
2017-05-02 01:03:28,815 WARN Included extra file "/etc/supervisor.d/php.ini" during parsing
2017-05-02 01:03:28,844 INFO RPC interface 'supervisor' initialized
2017-05-02 01:03:28,844 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2017-05-02 01:03:28,844 INFO supervisord started with pid 1
2017-05-02 01:03:29,846 INFO spawned: 'php-fpm' with pid 22
2017-05-02 01:03:29,847 INFO spawned: 'nginx' with pid 23
2017-05-02 01:03:31,355 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-05-02 01:03:31,355 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
sudo docker ps | grep 8080
cbbc1c23ba2c phpmyadmin/phpmyadmin "/run.sh phpmyadmin" 18 minutes ago Up 18 minutes 0.0.0.0:8080->80/tcp myadmin
答案 0 :(得分:0)
我重启了我的ubuntu和我的contenairs,phpmyadmin现在可见了。 (curl localhost:8080现在正确显示代码)。