When attempting to connect to Redshift from the latest liquibase/liquibase Docker image v4.17.0, Liquibase returns an error:
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).
This does not occur with the command-line version of Liquibase v4.17.0, the Redshift driver class is detected and connection works.
When the driver is specified and stored inside the container, Liquibase errors stating it cannot find the database driver, regardless of whether the driver class is specified as com.amazon.redshift.Driver (as specified in the driver JAR) or com.amazon.redshift.jdbc42.Driver (as specified in AWS docs):
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
FROM liquibase/liquibase:latest COPY entry.sh /entry.sh ADD https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/22.214.171.124/redshift-jdbc42-126.96.36.199.jar lib/redshift-jdbc42-188.8.131.52.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 executed on container (excluding credentials, url, etc.):
docker-entrypoint.sh --defaultsFile=liquibase.properties --classpath=lib/redshift-jdbc42-184.108.40.206.jar
Is there a way to connect from a Liquibase Docker container to Redshift?