我使用带有mysql官方镜像的docker容器来创建超过11个数据库容器(container1到container11)。设置完成后,所有容器都正常运行,直到container9。在container10上,它只能启动约1分钟,然后再次停止。使用docker日志检查容器,但我没有看到任何内容。停止container9,然后重新启动container10。它再次运行良好。这种情况似乎只会发生在我有9个mysql容器并尝试提高第10个容器时。如果我停止其中一个,然后再次启动它,那么就没有问题。这是一个bug吗?还是我遗漏了docker桥接的某些设置?
root@ec8dcb82f64d:/dev/shm# docker restart f4801b57c4cc
f4801b57c4cc
root@ec8dcb82f64d:/dev/shm# docker ps -a | grep f4801b57c4cc
f4801b57c4cc mysql/mysql-server:5.7 "/entrypoint.sh my..." 2 weeks ago Exited (1) 3 seconds ago db
root@ec8dcb82f64d:/dev/shm# docker logs f4801b57c4cc
Initializing database
Database initialized
MySQL init process in progress...
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
/entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
MySQL init process done. Ready for start up.
root@ec8dcb82f64d:/dev/shm#