我的php容器没有连接到我的数据库容器,我遇到了问题。我的码头-Compose.yml : # this is the mysql data volume we are going to hostthe data inside # This volume is used for elasticsearch
dev_elastic_searchdocker volume to host th
我有两种Docker容器:一种是web应用程序(nginx/php-fpm),另一种是MySQL数据库。两者都通过网络连接。数据库容器必须启动mysqld,这可能需要几秒钟的时间。另一个容器必须执行一些启动操作,其中一部分需要访问数据库。由于这些操作依赖于DB容器,因此我在脚本的顶部放置了一个循环,等待DB服务器可用:ok=0
until mysql -h$dbhost -u$dbuser -p$dbpass -e "USE虽然我知道,但我想知道:如何向</em