我试图将Mysql容器与Piwik'php app'连接起来我第一次运行mysql容器:
docker run --name piwik -e MYSQL_ROOT_PASSWORD=123456 -d mysql
然后我尝试运行并使用此命令链接piwik应用程序:
docker run -d -e PIWIK_MYSQL_USER=root -e PIWIK_MYSQL_PASSWORD=123456 -e PIWIK_MYSQL_DBNAME=piwik -e PIWIK_MYSQL_PREFIX=piwik_ --link piwik:piwikmysql --name vpiwik marvambass/piwik
但是当我检查日志时,我看到了这个错误:
ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
>> no DB installed, MYSQL User or Password specified - seems like the first start
> exec docker CMD
nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
2016/11/12 20:24:42 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/11/12 20:24:42 [emerg] 1#1: bind() to 0.0.0.0:443 failed (98: Address already in use)
[notice] 1#1: try again to bind() after 500ms
[notice] 1#1: using the "epoll" event method
[notice] 1#1: nginx/1.11.4
[notice] 1#1: built by gcc 4.9.2 (Debian 4.9.2-10)
[notice] 1#1: OS: Linux 4.4.14-moby
[notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
[notice] 1#1: start worker processes
[notice] 1#1: start worker process 141
答案 0 :(得分:0)
--link piwik:mysql