Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PostgreSQL JDBC driver jar to Iceberg image #125

Merged
merged 1 commit into from
May 9, 2022

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented May 6, 2022

Relates to trinodb/trino#11772

@cla-bot cla-bot bot added the cla-signed label May 6, 2022
@ebyhr ebyhr force-pushed the ebi/iceberg-jdbc branch from 53d1230 to 9c9b0f6 Compare May 6, 2022 06:39
@ebyhr ebyhr requested a review from findepi May 6, 2022 06:48
@@ -33,6 +33,9 @@ WORKDIR ${SPARK_HOME}/jars
# install Iceberg
RUN wget -nv "https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-spark-runtime-${ICEBERG_JAR_VERSION}/${ICEBERG_VERSION}/iceberg-spark-runtime-${ICEBERG_JAR_VERSION}-${ICEBERG_VERSION}.jar"

# install PostgreSQL driver for JDBC catalog
RUN wget -nv --no-check-certificate "https://jdbc.postgresql.org/download/postgresql-42.3.5.jar"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need --no-check-certificate? (we don't need it above; also, well, it's not secure)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I faced the below error when building the image. Switched to maven now.

Step 11/14 : RUN wget -nv --no-check-certificate "https://jdbc.postgresql.org/download/postgresql-42.3.5.jar"
 ---> Running in 5755549870dd
WARNING: cannot verify jdbc.postgresql.org's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:
  Issued certificate has expired.
2022-05-06 06:24:27 URL:https://jdbc.postgresql.org/download/postgresql-42.3.5.jar [1041066/1041066] -> "postgresql-42.3.5.jar" [1]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Both my browser and wget running locally had no problem downloading https://jdbc.postgresql.org/download/postgresql-42.3.5.jar.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too. Another option is installing ca-certificates beforehand.

yum install ca-certificates

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

installing ca-certificates is definitely better than --no-check-certificate

@ebyhr ebyhr force-pushed the ebi/iceberg-jdbc branch from 9c9b0f6 to 2e31559 Compare May 6, 2022 09:52
@ebyhr ebyhr merged commit 33ca3c1 into trinodb:master May 9, 2022
@ebyhr ebyhr deleted the ebi/iceberg-jdbc branch May 9, 2022 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants