flyway / flyway-docker

Official Flyway Docker images
Apache License 2.0
214 stars 82 forks source link

Unintuitive error when bind mount directory is invalid #132

Open bburtin opened 9 months ago

bburtin commented 9 months ago

Does anyone know what would cause this error when running the Flyway container? I started seeing it after doing a Docker system prune. I'm running on Windows 10 64bit with Docker Desktop and the Ubuntu subsystem, in case it matters. It happens with both the alpine

$ docker run --rm -v .:/flyway/sql redgate/flyway:10.5.0 -url=jdbc:postgresql://postgres/ -user=postgres migrate WARNING: This version of Flyway is out of date. Upgrade to Flyway 10.6.0: https://rd.gt/3rXiSlV

Flyway Community Edition 10.5.0 by Redgate

See release notes here: https://rd.gt/416ObMi ERROR: Unknown configuration properties: SOURCES,CSOURCES

bburtin commented 9 months ago

I eventually figured out that my bind mount (-v) is invalid. Once I fixed the local mount path, the Flyway container started working again.

The "Unknown configuration properties" error is pretty unintuitive. It would be better if Flyway would verify that it can find the SQL scripts before starting migration.

Barry-RG commented 9 months ago

Hi @bburtin The issue here seems to be happening before Flyway attempts the migration. The message ERROR: Unknown configuration properties: SOURCES,CSOURCES indicates that it has identified something as a configuration file which contains the properties SOURCES and CSOURCES which it does not understand. Unfortunately, from the information provided above I would not be able to tell what it is mistakenly thinking is a config file