Home > Blockchain >  Gradle task to create docker mysql container and fill it with databases and empty tables
Gradle task to create docker mysql container and fill it with databases and empty tables

Time:11-12

Basically the title, is there any good approaches i should look into? Currently i have an idea that gradle task will run docker compose file that creates mysql container and then something like liquibase that creates database and fills it with empty tables , but i'm having troubles finding how to make it real and if this is even possible, and maybe there are other better solutions.

CodePudding user response:

Are you able to run somehow docker from gradle? I'm not using it so I'm just asking. If so, then you can probably:

  • create a customized container with jib-gradle-plugin
  • run that container (watchout for container startup)
  • execute the liquibase

liquibase is not ment to create database itself, it only manages the schema. So you should prepare the database before (by customized image or just by docker)

  • Related