We are currently using liquibase combined with db2i (using the liquibase-db2i extension) in a kubernetes environment. Recently, we came across using-liquibase-in-kubernetes and using-liquibase-and-docker which suggests running the liquibase changes in a separate init-container to minimize the possibility for database locks to get stuck because of a container doing the liquibase changes being shutdown while it has an active lock.
My question is: what is the proper way to combine the provided liquibase container image and the required liquibase-db2i extension?
The first link does explain how to load a separate driver jar from a local c:projectsmy-projectlibmy-driver.jar by providing it to the classpath in the docker command:
docker run --rm -v c:projectsmy-projectsrcmainresources:/liquibase/changelog -v c:projectsmy-projectlib:/liquibase/classpath liquibase/liquibase
--classpath=liquibase/changelog:liquibase/classpath/my-driver.jar update
That’s pretty useful, but seems like only half of the solution. I’m not exactly sure how you would provide the liquibase-db2i extension code itself. Do we supply the liquibase-db2i jar in the same way? Should we create our own image based on theirs?