You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "sstremler (via GitHub)" <gi...@apache.org> on 2026/04/14 13:28:21 UTC

[PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

sstremler opened a new pull request, #22054:
URL: https://github.com/apache/kafka/pull/22054

   Fix Docker JVM image build when using local kafka archive
   
   - Replace $kafka_url with ${kafka_url:-} in Dockerfile to prevent set -eux from exiting when kafka_url is unset
   - Replace kafka-server-stop.sh with kill -TERM + wait to reliably stop the broker process and trigger JSA file generation on exit


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #22054:
URL: https://github.com/apache/kafka/pull/22054#discussion_r3832512651


##########
docker/jvm/Dockerfile:
##########
@@ -33,7 +33,7 @@ RUN set -eux ; \
     apk upgrade ; \
     apk add --no-cache bash procps-ng; \
     mkdir opt/kafka; \
-    if [ -n "$kafka_url" ]; then \
+    if [ -n "${kafka_url:-}" ]; then \

Review Comment:
   What do you think about using `ARG kafka_url=""` instead of `"${kafka_url:-}"`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #22054:
URL: https://github.com/apache/kafka/pull/22054#issuecomment-5308929835

   @sstremler would you please fix the conflicts?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

Posted by "sstremler (via GitHub)" <gi...@apache.org>.
sstremler commented on code in PR #22054:
URL: https://github.com/apache/kafka/pull/22054#discussion_r3847508240


##########
docker/jvm/Dockerfile:
##########
@@ -33,7 +33,7 @@ RUN set -eux ; \
     apk upgrade ; \
     apk add --no-cache bash procps-ng; \
     mkdir opt/kafka; \
-    if [ -n "$kafka_url" ]; then \
+    if [ -n "${kafka_url:-}" ]; then \

Review Comment:
   @chia7712 Good idea. I added it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker image builds when using local kafka archive [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #22054:
URL: https://github.com/apache/kafka/pull/22054#discussion_r3855631829


##########
docker/jvm/Dockerfile:
##########
@@ -21,7 +21,7 @@ FROM docker.io/library/eclipse-temurin:21-jre-alpine AS build-jsa
 USER root
 
 # Get kafka from https://archive.apache.org/dist/kafka and pass the url through build arguments
-ARG kafka_url
+ARG kafka_url=""

Review Comment:
   We missed another `kafka_url` ... This will be fixed in #23263.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22054:
URL: https://github.com/apache/kafka/pull/22054#issuecomment-5054226129

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening again.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

Posted by "sstremler (via GitHub)" <gi...@apache.org>.
sstremler commented on code in PR #22054:
URL: https://github.com/apache/kafka/pull/22054#discussion_r3815738841


##########
docker/jvm/Dockerfile:
##########
@@ -33,7 +33,7 @@ RUN set -eux ; \
     apk upgrade ; \
     apk add --no-cache bash procps-ng; \
     mkdir opt/kafka; \
-    if [ -n "$kafka_url" ]; then \
+    if [ -n "${kafka_url:-}" ]; then \

Review Comment:
   @chia7712 Sure. Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22054:
URL: https://github.com/apache/kafka/pull/22054#issuecomment-5030201578

   This PR is being marked as stale since it has not had any activity in 90 days. If you
   would like to keep this PR alive, please leave a comment asking for a review. If the PR has 
   merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out on the 
   [mailing list](https://kafka.apache.org/contact).
   <p>
   If this PR is no longer valid or desired, please feel free to close it. If no activity
   occurs in the next 30 days, it will be automatically closed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #22054:
URL: https://github.com/apache/kafka/pull/22054#discussion_r3794479227


##########
docker/jvm/Dockerfile:
##########
@@ -33,7 +33,7 @@ RUN set -eux ; \
     apk upgrade ; \
     apk add --no-cache bash procps-ng; \
     mkdir opt/kafka; \
-    if [ -n "$kafka_url" ]; then \
+    if [ -n "${kafka_url:-}" ]; then \

Review Comment:
   Would you mind applying the same fix to the native image build as well? It would be a great opportunity to backport `set -eux` to the native Dockerfile to improve script robustness.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker image builds when using local kafka archive [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #22054:
URL: https://github.com/apache/kafka/pull/22054


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

Posted by "sstremler (via GitHub)" <gi...@apache.org>.
sstremler commented on PR #22054:
URL: https://github.com/apache/kafka/pull/22054#issuecomment-5309732293

   > @sstremler would you please fix the conflicts?
   
   @chia7712 @dino2895 done.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22054:
URL: https://github.com/apache/kafka/pull/22054#issuecomment-4293428113

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening again.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20448: Fix Docker JVM image build when using local kafka archive [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #22054:
URL: https://github.com/apache/kafka/pull/22054#discussion_r3846994260


##########
docker/jvm/Dockerfile:
##########
@@ -33,7 +33,7 @@ RUN set -eux ; \
     apk upgrade ; \
     apk add --no-cache bash procps-ng; \
     mkdir opt/kafka; \
-    if [ -n "$kafka_url" ]; then \
+    if [ -n "${kafka_url:-}" ]; then \

Review Comment:
   @sstremler any feedback?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org