Flyway docker 找不到迁移脚本 - 警告:跳过文件系统位置:./sql(不可读)

Flyway docker failing to find migration scripts - WARNING: Skipping filesystem location:./sql (not readable)

我正在尝试通过 docker 运行 Flyway 6.5.7,但无法将我的脚本从主机挂载到容器中的 ./sql 路径。 我为 docker 容器创建一个卷并将其挂载为 -v [localhost path]:/flyway/sql, 我的理解是Flyway容器中的工作目录是/flyway。 我在命令行中设置了如下位置: -locations="filesystem:./sql"

当我启动 flyway 容器时,我收到以下警告:

WARNING: Skipping filesystem location:./sql (not readable). Note this warning will become an error in Flyway 7.

在我的数据库中创建了 flyway_schema_history table,但是,没有发现要执行的脚本。

这是 Flyway docker 容器的一些权限问题还是我遗漏了其他内容?

感谢@pero_hero 的解答!我需要在我正在挂载的本地目录上设置权限。