title: Flyway can't find migrations when database is run on docker container
body: <p>I have been following <a href="https://writeitdifferently.com/postgresql/flyway/2020/03/15/running-postgresql-and-flyway-with-docker-compose.html" rel="nofollow noreferrer">this tutorial</a> trying to set up a database using flyway migration scripts. The only difference with the tutorial is that I have been trying to use it in a Spring Boot application. For some reason, when I run &quot;docker-compose up&quot; I always get the the following logging in my terminal.</p>
  <blockquote>
  <p>flyway_1    | Flyway Community Edition 7.5.3 by Redgate flyway_1    |
  Database: jdbc:postgresql://postgres:5432/db-name (PostgreSQL 12.2)
  flyway_1    | Successfully validated 0 migrations (execution time
  00:00.041s) flyway_1    | WARNING: No migrations found. Are your
  locations set up correctly? flyway_1    | Current version of schema
  &quot;public&quot;: &lt;&lt; Empty Schema &gt;&gt; flyway_1    | Schema &quot;public&quot; is up to
  date. No migration necessary.</p>
  </blockquote>
  <p>However, I have a migration script under src/main/resources/db/migration. I am not sure why it is not able to find it, as it seems that is where flyway is supposed to look for them by default.</p>
  <p>Here is my docker-compose.yml file</p>
  <pre><code>version: '3'
  services:
    flyway:
      image: flyway/flyway:7.5.3
      command: -configFiles=/flyway/conf/flyway.config -locations=filesystem:/flyway/sql -connectRetries=60 migrate
      volumes:
      - ${PWD}/src/main/java/resources/db/migration
      - ${PWD}/docker-flyway.config:/flyway/conf/flyway.config
      depends_on:
      - postgres
    postgres:
      image: postgres:12.2
      restart: always
      ports:
      - &quot;5432:5432&quot;
      environment:
      - POSTGRES_USER=example-username
      - POSTGRES_PASSWORD=pass
      - POSTGRES_DB=db-name
  </code></pre>
  <p>And here is my docker-flyway.config file.</p>
  <pre><code>flyway.url=jdbc:postgresql://postgres:5432/db-name
  flyway.user=example-username
  flyway.password=pass
  flyway.baselineOnMigrate=false
  </code></pre>