It seems that at the point that the initdb
scripts are called MySQL is only available via socket and not via network connection. Therefore flyway can't run. I'm now using second docker container for flyway which conntects to the MySQL container. This works fine.