当尝试从最新的liquibase/liquibaseDocker镜像v4.17.0连接到Redshift时,liquibase返回错误:
Unexpected error running Liquibase: Driver class was not specified and could not be determined from the url (jdbc:redshift://aaaa.aaaa.eu-west-2.redshift.amazonaws.com:dddd:/aaaa).
Liquibase v4.17.0的命令行版本不会出现这种情况,检测到了Redshift驱动程序类,并且连接正常。
当驱动程序被指定并存储在容器中时,Liquibase会错误地指出它找不到数据库驱动程序,无论驱动程序类是被指定为com.amazon.redshift.driver(如驱动程序JAR中所指定(还是com.amazon-redshift.jdbc42.driver(正如AWS文档中所指定的(:
Unexpected error running Liquibase: Cannot find database driver: com.amazon.redshift.Driver
Unexpected error running Liquibase: Cannot find database driver: com.amazon.redshift.jdbc42.Driver
Dockerfile:
FROM liquibase/liquibase:latest
COPY entry.sh /entry.sh
ADD https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/2.1.0.9/redshift-jdbc42-2.1.0.9.jar lib/redshift-jdbc42-2.1.0.9.jar
ADD https://github.com/liquibase/liquibase-redshift/releases/download/v4.17.0/liquibase-redshift-4.17.0.jar lib/liquibase-redshift-4.17.0.jar
COPY liquibase.properties liquibase.properties
ENTRYPOINT ["/entry.sh"]
在容器上执行的Commaned(不包括凭据、url等(:
docker-entrypoint.sh --defaultsFile=liquibase.properties --classpath=lib/redshift-jdbc42-2.1.0.9.jar
有没有办法从Liquibase Docker容器连接到Redshift?