Skip to content

Commit

Permalink
absolute path is required when mounting volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
DoodleBobBuffPants authored Sep 1, 2020
1 parent 85b60f9 commit 0d50aa0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ CREATE TABLE MyTable (

Now run the image with the volume mapped:

`docker run --rm -v /my/sqldir:/flyway/sql flyway/flyway -url=jdbc:h2:mem:test -user=sa migrate`
`docker run --rm -v /absolute/path/to/my/sqldir:/flyway/sql flyway/flyway -url=jdbc:h2:mem:test -user=sa migrate`

## Adding a config file

Expand All @@ -81,7 +81,7 @@ flyway.user=sa

Now run the image with that volume mapped as well:

`docker run --rm -v /my/sqldir:/flyway/sql -v /my/confdir:/flyway/conf flyway/flyway migrate`
`docker run --rm -v /absolute/path/to/my/sqldir:/flyway/sql -v /absolute/path/to/my/confdir:/flyway/conf flyway/flyway migrate`

## Adding a JDBC driver

Expand Down Expand Up @@ -110,7 +110,7 @@ Create a directory and drop for example the Oracle JDBC driver (`ojdbc8.jar`) in

You can now let Flyway make use of it my mapping that volume as well:

`docker run --rm -v /my/sqldir:/flyway/sql -v /my/confdir:/flyway/conf -v /my/driverdir:/flyway/drivers flyway/flyway migrate`
`docker run --rm -v /absolute/path/to/my/sqldir:/flyway/sql -v /absolute/path/to/my/confdir:/flyway/conf -v /absolute/path/to/my/driverdir:/flyway/drivers flyway/flyway migrate`

## Adding Java-based migrations and callbacks

Expand All @@ -122,7 +122,7 @@ Create a directory and drop for a jar with your Java-based migrations in there.

You can now let Flyway make use of it my mapping that volume as well:

`docker run --rm -v /my/sqldir:/flyway/sql -v /my/confdir:/flyway/conf -v /my/jardir:/flyway/jars flyway/flyway migrate`
`docker run --rm -v /absolute/path/to/my/sqldir:/flyway/sql -v /absolute/path/to/my/confdir:/flyway/conf -v /absolute/path/to/my/jardir:/flyway/jars flyway/flyway migrate`

## Docker Compose

Expand Down

0 comments on commit 0d50aa0

Please sign in to comment.