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

fix: install openjdk-17 in Dockerfile #1037

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

crossoverJie
Copy link
Member

@crossoverJie crossoverJie commented Jun 25, 2023

Motivation

The master branch is broken:

head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
Exception in thread "main" java.lang.InternalError: Error loading java.security file

See https://github.com/apache/pulsar-client-go/actions/runs/5368805969/jobs/9740647704?pr=999

Modifications

Use openjdk-17-jre to replace openjdk-17-jre-headless.

Verifying this change

@crossoverJie crossoverJie mentioned this pull request Jun 25, 2023
1 task
@@ -25,7 +25,7 @@ ARG GOLANG_IMAGE=golang:latest
FROM $PULSAR_IMAGE as pulsar
FROM $GOLANG_IMAGE

RUN apt-get update && apt-get install -y openjdk-17-jre-headless ca-certificates
RUN apt-get update && apt-get install -y openjdk-17-jre 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.

The apachepulsar/pulsar:latest includes the JDK, so I think we can remove this line, could you try remove this line?

Copy link
Member Author

Choose a reason for hiding this comment

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

https://github.com/crossoverJie/pulsar-client-go/actions/runs/5370408829/jobs/9742470767?pr=5
It seems like it cannot work properly, need Java runtime environment.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
RUN apt-get update && apt-get install -y openjdk-17-jre ca-certificates
RUN apt-get update && apt-get install -y ca-certificates openjdk-17-jre-headless

According to https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1998065, how about trying to install ca-certificates-java before java.

Copy link
Member Author

Choose a reason for hiding this comment

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

According to bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1998065, how about trying to install ca-certificates-java before java.

https://github.com/crossoverJie/pulsar-client-go/actions/runs/5373160775/jobs/9747260724?pr=5

RUN apt-get update && apt-get install -y ca-certificates-java openjdk-17-jre-headless
RUN apt-get update && apt-get install -y ca-certificates openjdk-17-jre-headless

Neither of those methods worked.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I didn't notice that we use the golang as the base image.

I suggest we use the pulsar as the base image, and then we just need to install the golang to the base image.

Copy link
Member

Choose a reason for hiding this comment

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

Agree. That can be a follow-up. Let's fix the current situation first.

@tisonkun tisonkun merged commit 56c9691 into apache:master Jun 26, 2023
6 checks passed
@tisonkun tisonkun changed the title Fix openjdk-17 fix: install openjdk-17 in Dockerfile Jun 26, 2023
@RobertIndie RobertIndie added this to the v0.11.0 milestone Jul 4, 2023
RobertIndie pushed a commit that referenced this pull request Mar 8, 2024
### Motivation
There are related discussion records [here](#1037). It is recommended to switch the base image to `apachepulsar/pulsar`.


### Modifications

Change base image to `apachepulsar/pulsar`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants