This repository includes an example of how to build a custom Flyway image to perform database migrations using containers.
- Make sure to update the flyway.conf file with your host, port, user and password information
- Make sure to update the path where the configuration file will be stored
docker build . -t flyway-migrations
ConfigFile=./ConfigFile;
# Check migrations info
docker container run --rm \
--volume $ConfigFile:/flyway/conf \
--network host \
flyway-migrations info
# Perform migrations
docker container run --rm \
--volume $ConfigFile:/flyway/conf \
--network host \
flyway-migrations migrate
If you have questions or comments about this demo, don't hesitate to contact me at crobles@dbamastery.com