Docker
镜像官网: https://hub.docker.com/r/liquibase/liquibase
容器使用 https://docs.liquibase.com/workflows/liquibase-community/using-liquibase-and-docker.html?Highlight=docker
//下载镜像
docker pull liquibase/liquibase
//运行1 - 自行参照我写的格式
docker run --rm -v /www/server/liquibase/workspace/test_docker:/liquibase/changelog -v /www/server/liquibase/workspace/test_docker/lib:/liquibase/classpath liquibase/liquibase --classpath=/liquibase/changelog:/liquibase/classpath/mysql-connector-java-8.0.25.jar update-sql --defaultsFile=/liquibase/changelog/liquibase.properties
//运行2 - 自行参照我写的格式
docker run --rm -v /www/server/liquibase/workspace/liquibase_multi_schema_old:/liquibase/changelog -v /www/server/liquibase/workspace/liquibase_multi_schema_old/lib:/liquibase/otherLib liquibase/liquibase --classpath=/liquibase/changelog:/liquibase/otherLib/mysql-connector-java-8.0.25.jar update-sql --defaultsFile=/liquibase/changelog/liquibase.properties --contexts=lrc_blog_test1
//运行3 == 强烈建议这样用
docker run --rm -it -v /www/server/liquibase/workspace/liquibase_multi_schema_new_test:/liquibase/changelog liquibase/liquibase /bin/bash -c "cd /liquibase/changelog && liquibase update-sql --contexts=lrc_blog_test1"
//运行4 == 强烈建议这样用
docker run --rm -it -v /www/server/liquibase/workspace/liquibase_multi_schema_new_test:/liquibase/changelog liquibase/liquibase /bin/bash -c "cd /liquibase/changelog && liquibase update-sql --contexts=lrc_blog_test1 && exit"